<template>
  <div class="main">
    <el-row style="height: 100%">
      <el-col :span="3" class="menu_box">
        <el-anchor
          :container="containerRef"
          direction="vertical"
          type="default"
          :offset="30"
          @click="handleClick"
          class="anchor"
          :marker="false"
        >
          <el-anchor-link href="#part1" title="基本信息" @click="handeleMssage" />
          <el-anchor-link href="#part2" title="分类及症状" />
          <el-anchor-link href="#part3" title="一般状况" />
          <el-anchor-link href="#part4" title="生活方式" />
          <el-anchor-link href="#part5" title="脏器功能" />
          <el-anchor-link href="#part9" title="查体" />
          <el-anchor-link href="#part6" title="现存健康问题" />
          <el-anchor-link href="#part7" title="住院治疗情况" />
          <el-anchor-link href="#part8" title="非免疫规划接种" />
          <el-anchor-link href="#part10" title="用药情况" />
          <el-anchor-link href="#part11" title="体检评价" />
          <el-anchor-link href="#part12" title="健康指导" />
        </el-anchor>
      </el-col>
      <el-col :span="21">
        <div
          ref="containerRef"
          class="content_box"
          style="height: 800px; overflow-y: auto;overflow-x: hidden;padding-top: 30px"
        >
          <!-- <div id="part1" style="width: 100%; box-sizing: border-box"></div> -->
          <div style="width: 100%; box-sizing: border-box">
            <!-- 基本信息 -->
            <el-form
              :model="ruleForm"
              ref="ruleFormRef"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="姓名：" prop="name">
                    <!-- <el-input
                      v-model="ruleForm.name"
                      clearable
                      style="width: 80%; height: 32px"
                      :maxlength="20"
                    /> -->
                    <el-autocomplete
                      ref="NameInput"
                      v-model.trim="ruleForm.name"
                      @select="handleSelect"
                      :fetch-suggestions="queryNameAsync"
                      placeholder="请输入姓名"
                      style="width: 80%"
                      max-length="18"
                      @focus="handleFocus"
                      @keydown.enter.native="nextInput('phoneNumberInput')"
                    >
                    </el-autocomplete>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="联系电话：" prop="phoneNumber">
                    <el-input
                      ref="phoneNumberInput"
                      v-model="ruleForm.phoneNumber"
                      clearable
                      style="width: 80%; height: 32px"
                      placeholder="请输入联系电话"
                      @keydown.enter.native="nextInput('carNumberInput')"
                      maxlength="12"
                    />
                  </el-form-item>
                </el-col>
              
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="证件类型：" prop="cardType">
                    <el-select
                      v-model="ruleForm.cardType"
                      placeholder="请选择证件类型"
                      style="width: 80%; height: 32px"
                      ref="cardTypeInput"
                    >
                      <el-option
                        label="居民身份证"
                        value="居民身份证"
                      ></el-option>
                      <el-option
                        label="港澳台居民身份证"
                        value="港澳台居民身份证"
                      ></el-option>
                      <el-option
                        label="外国人永久居留身份证"
                        value="外国人永久居留身份证"
                      ></el-option>
                      <el-option
                        label="港澳台居民居住证"
                        value="港澳台居民居住证"
                      ></el-option>
                      <el-option
                        label="居民户口本"
                        value="居民户口本"
                      ></el-option>
                      <el-option label="护照" value="护照"></el-option>
                      <el-option label="军官证" value="军官证"></el-option>
                      <el-option
                        label="文职干部证"
                        value="文职干部证"
                      ></el-option>
                      <el-option label="士兵证" value="士兵证"></el-option>
                      <el-option label="驾驶执照" value="驾驶执照"></el-option>
                      <el-option label="出生证" value="出生证"></el-option>
                      <el-option label="其他" value="其他"></el-option>
                      <el-option label="儿保卡" value="儿保卡"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="证件号码：" prop="cardNumber">
                    <!-- <el-input
                      v-model="ruleForm.cardNumber"
                      clearable
                      style="width: 80%; height: 32px"
                    /> -->
                    <el-autocomplete
                      ref="carNumberInput"
                      v-model.trim="ruleForm.cardNumber"
                      @select="handleSelect"
                      :fetch-suggestions="queryCarNumberAsync"
                      placeholder="请输入证件号码"
                      style="width: 80%"
                      :maxlength="18"
                      @keydown.enter.native="nextInput('birthdayInput')"
                       @blur="getbirthday"
                    >
                    </el-autocomplete>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="出生日期：" prop="birthday">
                    <el-date-picker
                      ref="birthdayInput"
                      placeholder="请选择出生日期"
                      v-model="ruleForm.birthday"
                      :disabled-date="disableFutureDates"
                      type="date"
                      format="YYYY-MM-DD"
                      value-format="YYYY-MM-DD"
                      style="width: 80%; height: 32px"
                      @keydown.enter.native="nextInput('contactsInput')"
                      :teleported="false"
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="性别：" prop="gender">
                    <el-radio
                      v-model="ruleForm.gender"
                      class="el-radio-n"
                      label="男"
                      value="男"
                      border
                      size="small"
                      >男</el-radio
                    >
                    <el-radio
                      v-model="ruleForm.gender"
                      class="el-radio-n"
                      label="女"
                      value="女"
                      border
                      size="small"
                      >女</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="联系人姓名：" prop="contacts">
                    <el-input
                      ref="contactsInput"
                      v-model="ruleForm.contacts"
                      clearable
                      style="width: 80%; height: 32px"
                      placeholder="请输入联系人姓名"
                      @keydown.enter.native="nextInput('contactsNumberInput')"
                      maxlength="12"
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="联系人电话：" prop="contactsNumber">
                    <el-input
                      ref="contactsNumberInput"
                      v-model="ruleForm.contactsNumber"
                      clearable
                      style="width: 80%; height: 32px"
                      placeholder="请输入联系人电话"
                      @keydown.enter.native="nextInput('addressInput')"
                      maxlength="12"
                    />
                  </el-form-item>
                </el-col>
               
                <!-- <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="责任医生：" prop="respDoctor">
                    <el-input
                      ref="respDoctorInput"
                      v-model="ruleForm.respDoctor"
                      clearable
                      style="width: 80%; height: 32px"
                      placeholder="请输入责任医生"
                      @keydown.enter.native="nextInput('addressInput')"
                    />
                  </el-form-item>
                </el-col> -->
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="现住址：" prop="address">
                    <el-input
                      ref="addressInput"
                      v-model="ruleForm.address"
                      clearable
                      style="width: 92%; height: 32px"
                      placeholder="请输入现住址"
                      @keydown.enter.native="nextInput('domicileAddressInput')"
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="户籍地址：" prop="domicileAddress">
                    <el-input
                      ref="domicileAddressInput"
                      v-model="ruleForm.domicileAddress"
                      clearable
                      style="width: 92%; height: 32px"
                      placeholder="请输入户籍地址"
                      @keydown.enter.native="nextInput('heightInput')"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part2"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 分类及症状 -->
            <el-form
              :model="ruleForm2"
              ref="ruleFormRef2"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules2"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20 flex"
                >
                  <div>
                    <el-form-item
                      label="人群分类："
                      prop="populationCategoryList"
                    >
                      <el-checkbox-group
                        v-model="ruleForm2.populationCategoryList"
                      >
                        <el-checkbox label="高血压" value="高血压" />
                        <el-checkbox label="糖尿病" value="糖尿病" />
                        <el-checkbox label="老年人" value="老年人" disabled />
                        <el-checkbox label="其他" value="其他" />
                      </el-checkbox-group>
                    </el-form-item>
                  </div>
                  <div v-show="ruleForm2.crowdInput">
                    <el-form-item prop="populationCategoryOther">
                      <el-input
                        v-model="ruleForm2.populationCategoryOther"
                        clearable
                        style="width: 80%; height: 32px"
                        placeholder="请输入"
                      />
                    </el-form-item>
                  </div>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="症状：" prop="symptomList">
                    <el-checkbox-group
                      v-model="ruleForm2.symptomList"
                      @change="handleCheckboxChange"
                    >
                      <el-checkbox label="无症状" value="无症状" />

                      <el-checkbox
                        label="头痛"
                        value="头痛"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="头晕"
                        value="头晕"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="心悸"
                        value="心悸"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="胸闷"
                        value="胸闷"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="胸痛"
                        value="胸痛"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="慢性咳嗽"
                        value="慢性咳嗽"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="咳痰"
                        value="咳痰"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="呼吸困难"
                        value="呼吸困难"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="多饮"
                        value="多饮"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="多尿"
                        value="多尿"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="体重下降"
                        value="体重下降"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="乏力"
                        value="乏力"
                        @click="handleCheckboxChange1"
                      />
                      <!-- 第二排 -->
                      <el-checkbox
                        label="关节肿痛"
                        value="关节肿痛"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="视力模糊"
                        value="视力模糊"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="手脚麻木"
                        value="手脚麻木"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="尿痛"
                        value="尿痛"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="尿急"
                        value="尿急"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="便秘"
                        value="便秘"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="腹泻"
                        value="腹泻"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="恶心呕吐"
                        value="恶心呕吐"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="眼花"
                        value="眼花"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="耳鸣"
                        value="耳鸣"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="乳房胀痛"
                        value="乳房胀痛"
                        @click="handleCheckboxChange1"
                      />
                      <el-checkbox
                        label="其他"
                        value="其他"
                        @click="handleCheckboxChange1"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  v-show="ruleForm2.symptomInput"
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item prop="symptomOther" label=" ">
                    <el-input
                      v-model="ruleForm2.symptomOther"
                      clearable
                      placeholder="请输入"
                      style="height: 32px"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part3"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 一般状况 -->
            <el-form
              :model="ruleForm3"
              ref="ruleFormRef3"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules3"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="身高：" prop="height">
                    <!-- @blur="calcTargetHeight"
           :placeholder="ruleForm2.heightpl"
            -->
                    <div
                      style="
                        display: flex;
                        flex-direction: column;
                        height: 32px;
                        width: 100%;
                      "
                    >
                      <el-input
                        clearable
                        v-model="ruleForm3.height"
                        ref="heightInput"
                        :maxlength="5"
                        style="width: 80%; height: 32px"
                        placeholder="请输入身高"
                        @keydown.enter.native="nextInput('weightInput')"
                      >
                        <template #append>CM</template>
                      </el-input>
                      <span
                        v-show="ruleForm3.heightShow"
                        style="color: #ff0000; line-height: 32px"
                        >{{ ruleForm3.heightmsg }}</span
                      >
                    </div>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="体重：" prop="weight">
                    <div
                      style="
                        display: flex;
                        flex-direction: column;
                        height: 32px;
                        width: 100%;
                      "
                    >
                      <el-input
                        clearable
                        v-model="ruleForm3.weight"
                        ref="weightInput"
                        :maxlength="5"
                        style="width: 80%; height: 32px"
                        placeholder="请输入体重"
                        @keydown.enter.native="nextInput('waistInput')"
                      >
                        <template #append>KG</template>
                      </el-input>
                      <span
                        v-show="ruleForm3.weightShow"
                        style="color: #ff0000; line-height: 32px"
                        >{{ ruleForm3.weightmsg }}</span
                      >
                    </div>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="腰围：" prop="waist">
                    <div
                      style="
                        display: flex;
                        flex-direction: column;
                        height: 32px;
                        width: 100%;
                      "
                    >
                      <el-input
                        clearable
                        v-model="ruleForm3.waist"
                        ref="waistInput"
                        :maxlength="5"
                        style="width: 80%; height: 32px"
                        placeholder="请输入腰围"
                        @keydown.enter.native="nextInput('temperatureInput')"
                      >
                        <template #append>CM</template>
                      </el-input>
                      <span
                        v-show="ruleForm3.waistShow"
                        style="color: #ff0000; line-height: 32px"
                        >{{ ruleForm3.waistmsg }}</span
                      >
                    </div>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="体温：" prop="temperature">
                    <el-input
                      clearable
                      v-model="ruleForm3.temperature"
                      ref="temperatureInput"
                      :maxlength="4"
                      style="width: 80%; height: 32px"
                      placeholder="请输入体温"
                      @keydown.enter.native="nextInput('pulseInput')"
                    >
                      <template #append>℃</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="脉率：" prop="pulse">
                    <el-input
                      clearable
                      v-model="ruleForm3.pulse"
                      ref="pulseInput"
                      :maxlength="3"
                      style="width: 80%; height: 32px"
                      placeholder="请输入脉率"
                      @keydown.enter.native="nextInput('breathingRateInput')"
                    >
                      <template #append>次/分钟</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="呼吸频率：" prop="breathingRate">
                    <el-input
                      clearable
                      v-model="ruleForm3.breathingRate"
                      ref="breathingRateInput"
                      :maxlength="2"
                      style="width: 80%; height: 32px"
                      placeholder="请输入呼吸频率"
                      @keydown.enter.native="nextInput('leftSystolicInput')"
                    >
                      <template #append>次/分钟</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="左侧收缩压：" prop="leftSystolic">
                    <el-input
                      clearable
                      v-model="ruleForm3.leftSystolic"
                      ref="leftSystolicInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入左侧收缩压"
                      @keydown.enter.native="nextInput('leftDiastolicInput')"
                    >
                      <template #append>mmHg</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="左侧舒张压：" prop="leftDiastolic">
                    <el-input
                      clearable
                      v-model="ruleForm3.leftDiastolic"
                      ref="leftDiastolicInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入左侧舒张压"
                      @keydown.enter.native="nextInput('rightSystolicInput')"
                    >
                      <template #append>mmHg</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="右侧收缩压：" prop="rightSystolic">
                    <el-input
                      clearable
                      v-model="ruleForm3.rightSystolic"
                      ref="rightSystolicInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入右侧收缩压"
                      @keydown.enter.native="nextInput('rightDiastolicInput')"
                    >
                      <template #append>mmHg</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="右侧舒张压：" prop="rightDiastolic">
                    <el-input
                      clearable
                      v-model="ruleForm3.rightDiastolic"
                      ref="rightDiastolicInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入右侧舒张压"
                      @keydown.enter.native="nextInput('randomGlucoseInput')"
                    >
                      <template #append>mmHg</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="随机血糖：" prop="randomGlucose">
                    <el-input
                      clearable
                      v-model="ruleForm3.randomGlucose"
                      ref="randomGlucoseInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入随机血糖"
                      @keydown.enter.native="nextInput('fastingBloodGlucoseInput')"
                    >
                      <template #append>mmol/L</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="空腹血糖：" prop="fastingBloodGlucose">
                    <el-input
                      clearable
                      v-model="ruleForm3.fastingBloodGlucose"
                      ref="fastingBloodGlucoseInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入空腹血糖"
                      @keydown.enter.native="nextInput('weeklySportsInput')"
                    >
                      <template #append>mmol/L</template>
                    </el-input>
                  </el-form-item>
                </el-col>
               
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm2.populationCategoryList?.includes('老年人')"
                >
                  <el-form-item
                    label="健康状态自我评估："
                    prop="healthSelfRating"
                  >
                    <el-radio-group v-model="ruleForm3.healthSelfRating">
                      <el-radio label="满意" name="healthSelfRating"></el-radio>
                      <el-radio
                        label="基本满意"
                        value="基本满意"
                        name="healthSelfRating"
                      ></el-radio>
                      <el-radio
                        label="说不清楚"
                        value="说不清楚"
                        name="healthSelfRating"
                      ></el-radio>
                      <el-radio
                        label="不太满意"
                        value="不太满意"
                        name="healthSelfRating"
                      ></el-radio>
                      <el-radio
                        label="不满意"
                        value="不满意"
                        name="healthSelfRating"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm2.populationCategoryList.includes('老年人')"
                >
                  <el-form-item label="认知功能：" prop="cognition">
                    <el-radio
                      v-model="ruleForm3.cognition"
                      class="el-radio-n"
                      label="粗筛阳性"
                      value="粗筛阳性"
                      border
                      size="small"
                      >粗筛阳性</el-radio
                    >
                    <el-radio
                      v-model="ruleForm3.cognition"
                      class="el-radio-n"
                      label="粗筛阴性"
                      value="粗筛阴性"
                      border
                      size="small"
                      >粗筛阴性</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm2.populationCategoryList.includes('老年人')"
                >
                  <el-form-item
                    label="生活自理能力评估："
                    prop="elderlySelfCareScore"
                  >
                    <el-radio-group
                      v-model="ruleForm3.elderlySelfCareScore"
                      disabled
                    >
                      <el-radio
                        label="可自理（0-3分）"
                        value="可自理（0-3分）"
                        name="elderlySelfCareScore"
                      ></el-radio>
                      <el-radio
                        label="轻度依赖（4-8分）"
                        value="轻度依赖（4-8分）"
                        name="elderlySelfCareScore"
                      ></el-radio>
                      <el-radio
                        label="中度依赖（9-18分）"
                        value="中度依赖（9-18分）"
                        name="elderlySelfCareScore"
                      ></el-radio>
                      <el-radio
                        label="不能自理（≥19分）"
                        value="不能自理（≥19分）"
                        name="elderlySelfCareScore"
                      ></el-radio>
                    </el-radio-group>
                    <el-button
                      style="margin-left: 10px"
                      type="primary"
                      native-type="button"
                      @click="selfCareAssessmentVisible = true"
                    >
                      老年人生活自理能力检查表
                    </el-button>
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part4"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 生活方式 -->
            <el-form
              :model="ruleForm4"
              ref="ruleFormRef4"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules4"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="每周运动次数：" prop="weeklyExercises">
                    <!-- @blur="calcTargetHeight"
           :placeholder="ruleForm2.heightpl"
            @keydown.enter.native="NextInput('weightInput')" -->
                    <el-input
                      v-model="ruleForm4.weeklyExercises"
                      clearable
                      ref="weeklySportsInput"
                      :maxlength="2"
                      style="width: 80%; height: 32px"
                      placeholder="请输入每周运动次数"
                      @keydown.enter.native.prevent="
                        nextInput('weeklySportsTimeInput')
                      "
                    >
                      <template #append>次/周</template>
                    </el-input>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="this.ruleForm4.durationShow"
                >
                  <el-form-item label="每次运动时间：" prop="exerciseTime">
                    <el-input
                      clearable
                      v-model="ruleForm4.exerciseTime"
                      ref="weeklySportsTimeInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入每次运动时间"
                      @keydown.enter.native="nextInput('habitTimeInput')"
                    >
                      <template #append>分钟</template>
                    </el-input>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="this.ruleForm4.durationShow"
                >
                  <el-form-item label="坚持运动时间：" prop="exerciseYears">
                    <el-input
                      clearable
                      v-model="ruleForm4.exerciseYears"
                      ref="habitTimeInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                      placeholder="请输入坚持运动时间"
                      @keydown.enter.native="nextInput('exerciseTypeInpunt')"
                    >
                      <template #append>年</template>
                    </el-input>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="this.ruleForm4.durationShow"
                >
                  <el-form-item label="运动方式：" prop="exerciseType">
                    <el-input
                      clearable
                      v-model="ruleForm4.exerciseType"
                      ref="exerciseTypeInpunt"
                      :maxlength="30"
                      style="width: 80%; height: 32px"
                      placeholder="请输入运动方式"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="饮食习惯：" prop="dietPartOne">
                    <!-- <el-checkbox-group v-model="ruleForm4.dietPartTwo">
                  <el-checkbox label="荤素均衡" value="荤素均衡" />
                  <el-checkbox label="荤食为主" value="荤食为主" />
                  <el-checkbox label="素食为主" value="素食为主" />
                  <el-checkbox label="嗜盐" value="嗜盐" />
                  <el-checkbox label="嗜油" value="嗜油" />
                  <el-checkbox label="嗜糖" value="嗜糖" />
                </el-checkbox-group> -->
                    <el-radio-group
                      v-model="ruleForm4.dietPartOne"
                      style="margin-right: 20px"
                    >
                      <el-radio label="荤素均衡" value="荤素均衡" />
                      <el-radio label="荤食为主" value="荤食为主" />
                      <el-radio label="素食为主" value="素食为主" />
                    </el-radio-group>
                    <el-checkbox-group v-model="ruleForm4.dietPartTwo">
                      <el-checkbox label="嗜盐" value="嗜盐" />
                      <el-checkbox label="嗜油" value="嗜油" />
                      <el-checkbox label="嗜糖" value="嗜糖" />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="吸烟情况：" prop="smoking">
                    <el-radio-group v-model="ruleForm4.smoking">
                      <el-radio
                        label="从不吸烟"
                        value="从不吸烟"
                        name="smoking"
                      ></el-radio>
                      <el-radio
                        label="已戒烟"
                        value="已戒烟"
                        name="smoking"
                      ></el-radio>
                      <el-radio
                        label="吸烟"
                        value="吸烟"
                        name="smoking"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="this.ruleForm4.smoking == '吸烟'"
                >
                  <el-form-item label="日吸烟量：" prop="dailySmoke">
                    <el-input
                      clearable
                      v-model="ruleForm4.dailySmoke"
                      placeholder="请输入日吸烟量"
                      ref="dailySmokeInput"
                      :maxlength="3"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>支</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="
                    this.ruleForm4.smoking == '吸烟' ||
                    this.ruleForm4.smoking == '已戒烟'
                  "
                >
                  <el-form-item label="开始吸烟年龄：" prop="startSmokingAge">
                    <el-input
                      clearable
                      v-model="ruleForm4.startSmokingAge"
                      placeholder="请输入开始吸烟年龄"
                      ref="startSmokeInput"
                      :maxlength="3"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>岁</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="this.ruleForm4.smoking == '已戒烟'"
                >
                  <el-form-item label="戒烟年龄：" prop="quitSmokingAge">
                    <el-input
                      clearable
                      v-model="ruleForm4.quitSmokingAge"
                      placeholder="请输入戒烟年龄"
                      ref="quitSmokeInput"
                      :maxlength="3"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>岁</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="饮酒频率：" prop="drinkingFrequency">
                    <el-radio-group v-model="ruleForm4.drinkingFrequency">
                      <el-radio
                        label="从不"
                        value="从不"
                        name="drinkingFrequency"
                      ></el-radio>
                      <el-radio
                        label="偶尔"
                        value="偶尔"
                        name="drinkingFrequency"
                      ></el-radio>
                      <el-radio
                        label="经常"
                        value="经常"
                        name="drinkingFrequency"
                      ></el-radio>
                      <el-radio
                        label="每天"
                        value="每天"
                        name="drinkingFrequency"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.drinkingFrequency !== '从不'"
                >
                  <el-form-item label="日饮酒量：" prop="dailyDrinkAmount">
                    <el-input
                      clearable
                      v-model="ruleForm4.dailyDrinkAmount"
                      placeholder="请输入日饮酒量"
                      ref="dailyDrinkInput"
                      :maxlength="2"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>两</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.drinkingFrequency !== '从不'"
                >
                  <el-form-item
                    label="近一年是否曾醉酒："
                    prop="drunkInPastYear"
                  >
                    <el-radio
                      v-model="ruleForm4.drunkInPastYear"
                      class="el-radio-n"
                      label="是"
                      value="是"
                      border
                      size="small"
                      >是</el-radio
                    >
                    <el-radio
                      v-model="ruleForm4.drunkInPastYear"
                      class="el-radio-n"
                      label="否"
                      value="否"
                      border
                      size="small"
                      >否</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.drinkingFrequency !== '从不'"
                >
                  <el-form-item label="开始饮酒年龄：" prop="startDrinkingAge">
                    <el-input
                      clearable
                      v-model="ruleForm4.startDrinkingAge"
                      placeholder="请输入开始饮酒年龄"
                      ref="startDrinkInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>岁</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.drinkingFrequency !== '从不'"
                >
                  <el-form-item label="是否戒酒：" prop="quitDrinking">
                    <el-radio
                      v-model="ruleForm4.quitDrinking"
                      class="el-radio-n"
                      label="是"
                      value="是"
                      border
                      size="small"
                      >是</el-radio
                    >
                    <el-radio
                      v-model="ruleForm4.quitDrinking"
                      class="el-radio-n"
                      label="否"
                      value="否"
                      border
                      size="small"
                      >否</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.drinkingFrequency !== '从不'"
                >
                  <el-form-item label="戒酒年龄：" prop="quitDrinkingAge">
                    <el-input
                      clearable
                      v-model="ruleForm4.quitDrinkingAge"
                      placeholder="请输入戒酒年龄"
                      ref="quitDrinkInput"
                      :maxlength="3"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>岁</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm4.drinkingFrequency !== '从不'"
                >
                  <el-form-item label="饮酒种类：" prop="drinkTypeList">
                    <el-checkbox-group v-model="ruleForm4.drinkTypeList">
                      <el-checkbox label="白酒" value="白酒" />
                      <el-checkbox label="啤酒" value="啤酒" />
                      <el-checkbox label="红酒" value="红酒" />
                      <el-checkbox label="黄酒" value="黄酒" />
                      <el-checkbox label="其他" value="其他" />
                    </el-checkbox-group>
                    <el-input
                      v-if="ruleForm4.drinkTypeList.includes('其他')"
                      clearable
                      v-model="ruleForm4.drinkTypeListOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="职业危害因素：" prop="jobHazards">
                    <!-- <el-radio
                  v-model="ruleForm4.jobHazards"
                  class="el-radio-n"
                  label="有"
                  value="有"
                  border
                  size="small"
                  style="margin-right: 45px"
                  >有</el-radio
                >
                <el-radio
                  v-model="ruleForm4.jobHazards"
                  class="el-radio-n"
                  label="无"
                  value="无"
                  border
                  size="small"
                  >无</el-radio
                > -->
                    <el-radio-group v-model="ruleForm4.jobHazards">
                      <el-radio
                        label="无"
                        value="无"
                        name="jobHazards"
                      ></el-radio>
                      <el-radio
                        label="化学物质"
                        value="化学物质"
                        name="jobHazards"
                      ></el-radio>
                      <el-radio
                        label="物理因素"
                        value="物理因素"
                        name="jobHazards"
                      ></el-radio>
                      <el-radio
                        label="放射物质"
                        value="放射物质"
                        name="jobHazards"
                      ></el-radio>
                      <el-radio
                        label="粉尘"
                        value="粉尘"
                        name="jobHazards"
                      ></el-radio>
                      <el-radio
                        label="其他"
                        value="其他"
                        name="jobHazards"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards !== '无'"
                >
                  <el-form-item label="具体职业：" prop="specificJob">
                    <el-input
                      clearable
                      v-model="ruleForm4.specificJob"
                      placeholder="请输入具体职业"
                      ref=" "
                      :maxlength="20"
                      style="width: 80%; height: 32px"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards !== '无'"
                >
                  <el-form-item label="从业时间：" prop="yearsOfService">
                    <el-input
                      clearable
                      v-model="ruleForm4.yearsOfService"
                      placeholder="请输入从业时间"
                      ref="yearsOfServiceInput"
                      :maxlength="5"
                      style="width: 80%; height: 32px"
                    >
                      <template #append>年</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '化学物质'"
                >
                  <el-form-item label="化学物质：" prop="otherHazards">
                    <el-input
                      clearable
                      v-model="ruleForm4.otherHazards"
                      placeholder="请输入化学物质"
                      ref=" "
                      :maxlength="30"
                      style="width: 80%; height: 32px"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '化学物质'"
                >
                  <el-form-item label="防护措施：" prop="otherProtection">
                    <el-radio-group
                      v-model="ruleForm4.otherProtection"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="otherProtection"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="otherProtection"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm4.otherProtection == '有'"
                      style="height: 32px; width: 135px"
                      v-model="ruleForm4.otherProtectionOther"
                      placeholder="请输入防护措施"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '物理因素'"
                >
                  <el-form-item label="物理因素：" prop="otherHazards">
                    <el-input
                      clearable
                      v-model="ruleForm4.otherHazards"
                      placeholder="请输入物理因素"
                      ref=" "
                      :maxlength="30"
                      style="width: 80%; height: 32px"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '物理因素'"
                >
                  <el-form-item label="防护措施：" prop="otherProtection">
                    <el-radio-group
                      v-model="ruleForm4.otherProtection"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="otherProtection"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="otherProtection"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm4.otherProtection == '有'"
                      clearable
                      style="height: 32px; width: 135px"
                      v-model="ruleForm4.otherProtectionOther"
                      placeholder="请输入防护措施"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '放射物质'"
                >
                  <el-form-item label="放射物质：" prop="otherHazards">
                    <el-input
                      clearable
                      v-model="ruleForm4.otherHazards"
                      placeholder="请输入放射物质"
                      ref=" "
                      :maxlength="30"
                      style="width: 80%; height: 32px"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '放射物质'"
                >
                  <el-form-item label="防护措施：" prop="otherProtection">
                    <el-radio-group
                      v-model="ruleForm4.otherProtection"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="otherProtection"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="otherProtection"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm4.otherProtection == '有'"
                      clearable
                      style="height: 32px; width: 135px"
                      v-model="ruleForm4.otherProtectionOther"
                      placeholder="请输入防护措施"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '粉尘'"
                >
                  <el-form-item label="粉尘：" prop="otherHazards">
                    <el-input
                      clearable
                      v-model="ruleForm4.otherHazards"
                      placeholder="请输入粉尘"
                      ref=" "
                      :maxlength="30"
                      style="width: 80%; height: 32px"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '粉尘'"
                >
                  <el-form-item label="防护措施：" prop="otherProtection">
                    <el-radio-group
                      v-model="ruleForm4.otherProtection"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="otherProtection"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="otherProtection"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm4.otherProtection == '有'"
                      clearable
                      style="height: 32px; width: 135px"
                      v-model="ruleForm4.otherProtectionOther"
                      placeholder="请输入防护措施"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '其他'"
                >
                  <el-form-item label="其他：" prop="otherHazards">
                    <el-input
                      clearable
                      v-model="ruleForm4.otherHazards"
                      placeholder="请输入其他"
                      ref=" "
                      :maxlength="30"
                      style="width: 80%; height: 32px"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                  v-if="ruleForm4.jobHazards == '其他'"
                >
                  <el-form-item label="防护措施：" prop="otherProtection">
                    <el-radio-group
                      v-model="ruleForm4.otherProtection"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="otherProtection"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="otherProtection"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm4.otherProtection == '有'"
                      clearable
                      style="height: 32px; width: 135px"
                      v-model="ruleForm4.otherProtectionOther"
                      placeholder="请输入防护措施"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part5"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 脏器功能 -->
            <el-form
              :model="ruleForm5"
              ref="ruleFormRef5"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules5"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="口唇：" prop="lips">
                    <el-radio-group v-model="ruleForm5.lips">
                      <el-radio
                        label="红润"
                        value="红润"
                        name="lips"
                      ></el-radio>
                      <el-radio
                        label="苍白"
                        value="苍白"
                        name="lips"
                      ></el-radio>
                      <el-radio
                        label="发绀"
                        value="发绀"
                        name="lips"
                      ></el-radio>
                      <el-radio
                        label="皲裂"
                        value="皲裂"
                        name="lips"
                      ></el-radio>
                      <el-radio
                        label="疱疹"
                        value="疱疹"
                        name="lips"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="咽部：" prop="throatList">
                    <el-checkbox-group v-model="ruleForm5.throatList">
                      <el-checkbox
                        label="无充血"
                        value="无充血"
                        @change="changePharynx"
                      />
                      <el-checkbox
                        label="充血"
                        value="充血"
                        @change="changePharynx2"
                      />
                      <el-checkbox
                        label="淋巴滤泡增生"
                        value="淋巴滤泡增生"
                        @change="changePharynx2"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="齿列：" prop="teethAlignmentList">
                    <el-checkbox-group v-model="ruleForm5.teethAlignmentList">
                      <el-checkbox
                        label="正常"
                        value="正常"
                        @change="changeDentalHealth"
                      />
                      <el-checkbox
                        label="缺齿"
                        value="缺齿"
                        @change="changeDentalHealth2"
                      />
                      <el-checkbox
                        label="龋齿"
                        value="龋齿"
                        @change="changeDentalHealth2"
                      />
                      <el-checkbox
                        label="义齿(假牙)"
                        value="义齿(假牙)"
                        @change="changeDentalHealth2"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="
                    !ruleForm5.teethAlignmentList.includes('正常') &&
                    ruleForm5.teethAlignmentList.length > 0
                  "
                >
                  <el-form-item label=" ">
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <div class="title_box">左上</div>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <div class="title_box">左下</div>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <div class="title_box">右上</div>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <div class="title_box">右下</div>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm5.teethAlignmentList.includes('缺齿')"
                >
                  <el-form-item label="缺齿：">
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.missing_teeth_top_left"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="missing_teeth_top_left"
                         @keydown.enter.native="nextInput('missing_teeth_bottom_left')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.missing_teeth_bottom_left"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="missing_teeth_bottom_left"
                         @keydown.enter.native="nextInput('missing_teeth_top_right')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.missing_teeth_top_right"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="missing_teeth_top_right"
                         @keydown.enter.native="nextInput('missing_teeth_bottom_right')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.missing_teeth_bottom_right"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="missing_teeth_bottom_right"
                        @keydown.enter.native="nextInput('missing_teeth')"
                      ></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm5.teethAlignmentList.includes('龋齿')"
                >
                  <el-form-item label="龋齿：">
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.cavities_top_left"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="cavities_top_left"
                        @keydown.enter.native="nextInput('cavities_bottom_left')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.cavities_bottom_left"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="cavities_bottom_left"
                         @keydown.enter.native="nextInput('cavities_top_right')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.cavities_top_right"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="cavities_top_right"
                        @keydown.enter.native="nextInput('cavities_bottom_right')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.cavities_bottom_right"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="cavities_bottom_right"
                        @keydown.enter.native="nextInput('cavities')"
                      ></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm5.teethAlignmentList.includes('义齿(假牙)')"
                >
                  <el-form-item label="义齿：">
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.dentures_top_left"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="dentures_top_left"
                        @keydown.enter.native="nextInput('dentures_bottom_left')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.dentures_bottom_left"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="dentures_bottom_left"
                         @keydown.enter.native="nextInput('dentures_top_right')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.dentures_top_right"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="dentures_top_right"
                          @keydown.enter.native="nextInput('dentures_bottom_right')"
                      ></el-input>
                    </el-col>
                    <el-col :xs="5" :sm="5" :md="5" :lg="5" :xl="5">
                      <el-input
                        clearable
                        v-model="ruleForm5.dentures_bottom_right"
                        placeholder="请输入"
                        style="height: 32px; width: 152px"
                        ref="dentures_bottom_right"
                         @keydown.enter.native="nextInput('leftEyeInput')"
                      ></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  style="display: flex"
                >
                  <div>
                    <el-form-item label="视力：" prop="vision">
                      <el-radio-group v-model="ruleForm5.vision">
                        <el-radio
                          label="裸眼视力"
                          value="裸眼视力"
                          name="vision"
                          @change="visionChange"
                        ></el-radio>
                        <el-radio
                          label="矫正视力"
                          value="矫正视力"
                          name="vision"
                          @change="visionChange2"
                        ></el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </div>

                  <el-form-item
                    prop="leftEye"
                    style="margin-left: 20px"
                    v-if="ruleForm5.vision == '裸眼视力'"
                  >
                    <el-input
                      ref="leftEyeInput"
                      clearable
                      v-model="ruleForm5.leftEye"
                      placeholder="请输入左侧裸眼视力"
                      style="width: 160px; height: 32px; margin-right: 20px"
                      maxlength="4"
                       @keydown.enter.native="nextInput('rightEyeInput')"
                    ></el-input>
                  </el-form-item>
                  <el-form-item
                    prop="rightEye"
                    style="margin-left: 20px"
                    v-if="ruleForm5.vision == '裸眼视力'"
                  >
                    <el-input
                      ref="rightEyeInput"
                      clearable
                      v-model="ruleForm5.rightEye"
                      placeholder="请输入右侧裸眼视力"
                      style="width: 160px; height: 32px"
                      maxlength="4"
                    ></el-input>
                  </el-form-item>

                  <el-form-item
                    prop="leftjzEye"
                    style="margin-left: 20px"
                    v-if="ruleForm5.vision == '矫正视力'"
                  >
                    <el-input
                      ref="leftjzEyeInput"
                      clearable
                      v-model="ruleForm5.leftjzEye"
                      placeholder="请输入左侧矫正视力"
                      style="width: 160px; height: 32px; margin-right: 20px"
                      maxlength="4"
                       @keydown.enter.native="nextInput('rightjzEyeInput')"
                    ></el-input>
                  </el-form-item>
                  <el-form-item
                    prop="rightjzEye"
                    style="margin-left: 20px"
                    v-if="ruleForm5.vision == '矫正视力'"
                  >
                    <el-input
                      ref="rightjzEyeInput"
                      clearable
                      v-model="ruleForm5.rightjzEye"
                      placeholder="请输入右侧矫正视力"
                      style="width: 160px; height: 32px"
                      maxlength="4"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="听力：" prop="hearing">
                    <el-radio-group v-model="ruleForm5.hearing">
                      <el-radio
                        label="听见"
                        value="听见"
                        name="hearing"
                      ></el-radio>
                      <el-radio
                        label="听不清或无法听见"
                        value="听不清或无法听见"
                        name="hearing"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="运动功能：" prop="motorFunction">
                    <el-radio-group v-model="ruleForm5.motorFunction">
                      <el-radio
                        label="可顺利完成"
                        value="可顺利完成"
                        name="motorFunction"
                      ></el-radio>
                      <el-radio
                        label="无法独立完成其中任何一个动作"
                        value="无法独立完成其中任何一个动作"
                        name="motorFunction"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part9"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 查体 -->
            <el-form
              :model="ruleForm9"
              ref="ruleFormRef9"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules9"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="皮肤：" prop="skin">
                    <el-radio-group v-model="ruleForm9.skin">
                      <el-radio
                        label="正常"
                        value="正常"
                        name="skin"
                      ></el-radio>
                      <el-radio
                        label="潮红"
                        value="潮红"
                        name="skin"
                      ></el-radio>
                      <el-radio
                        label="发绀"
                        value="发绀"
                        name="skin"
                      ></el-radio>
                      <el-radio
                        label="黄染"
                        value="黄染"
                        name="skin"
                      ></el-radio>
                      <el-radio
                        label="色素沉着"
                        value="色素沉着"
                        name="skin"
                      ></el-radio>
                      <el-radio
                        label="其他"
                        value="其他"
                        name="skin"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.skin == '其他'"
                      clearable
                      v-model="ruleForm9.skinOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="巩膜：" prop="sclera">
                    <el-radio-group v-model="ruleForm9.sclera">
                      <el-radio
                        label="正常"
                        value="正常"
                        name="sclera"
                      ></el-radio>
                      <el-radio
                        label="黄染"
                        value="黄染"
                        name="sclera"
                      ></el-radio>
                      <el-radio
                        label="充血"
                        value="充血"
                        name="sclera"
                      ></el-radio>
                      <el-radio
                        label="其他"
                        value="其他"
                        name="sclera"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.sclera == '其他'"
                      clearable
                      v-model="ruleForm9.scleraOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px;margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="淋巴结：" prop="lymphNodesList">
                    <!-- <el-radio-group v-model="ruleForm9.lymphNodesList">
                  <el-radio label="正常"  value="正常" name="lymphNodesList"></el-radio>
                  <el-radio label="锁骨上"  value="锁骨上" name="lymphNodesList"></el-radio>
                  <el-radio label="腋窝" value="腋窝" name="lymphNodesList"></el-radio>
                  <el-radio label="其他"  value="其他" name="lymphNodesList"></el-radio>
                </el-radio-group> -->
                    <el-checkbox-group v-model="ruleForm9.lymphNodesList">
                      <el-checkbox
                        label="未触及"
                        value="未触及"
                        @change="changelymp"
                      />
                      <el-checkbox
                        label="锁骨上"
                        value="锁骨上"
                        @change="changelymp2"
                      />
                      <el-checkbox
                        label="腋窝"
                        value="腋窝"
                        @change="changelymp2"
                      />
                      <el-checkbox
                        label="其他"
                        value="其他"
                        @change="changelymp2"
                      />
                    </el-checkbox-group>
                    <el-input
                      v-if="ruleForm9.lymphNodesList.includes('其他')"
                      clearable
                      v-model="ruleForm9.lymphNodesOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="肺部桶状胸：" prop="barrelChest">
                    <el-radio
                      v-model="ruleForm9.barrelChest"
                      class="el-radio-n"
                      label="否"
                      value="否"
                      border
                      size="small"
                      >否</el-radio
                    >
                    <el-radio
                      v-model="ruleForm9.barrelChest"
                      class="el-radio-n"
                      label="是"
                      value="是"
                      border
                      size="small"
                      >是</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="肺部呼吸音：" prop="breathSounds">
                    <el-radio-group v-model="ruleForm9.breathSounds">
                      <el-radio
                        label="正常"
                        value="正常"
                        name="breathSounds"
                      ></el-radio>
                      <el-radio
                        label="异常"
                        value="异常"
                        name="breathSounds"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.breathSounds == '异常'"
                      clearable
                      v-model="ruleForm9.breathSoundsOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="肺部啰音：" prop="ralesList">
                    <!-- <el-radio-group v-model="ruleForm9.ralesList">
                  <el-radio label="无" value="无" name="ralesList"></el-radio>
                  <el-radio label="干啰音"  value="干啰音" name="ralesList"></el-radio>
                  <el-radio label="湿啰音" value="湿啰音"  name="ralesList"></el-radio>
                  <el-radio label="其他" value="其他" name="ralesList"></el-radio>
                </el-radio-group> -->
                    <el-checkbox-group v-model="ruleForm9.ralesList">
                      <el-checkbox
                        label="无"
                        value="无"
                        style="margin-right: 50px"
                        @change="changeLung"
                      />
                      <el-checkbox
                        label="干啰音"
                        value="干啰音"
                        style="margin-right: 50px"
                        @change="changeLung2"
                      />
                      <el-checkbox
                        label="湿啰音"
                        value="湿啰音"
                        style="margin-right: 50px"
                        @change="changeLung2"
                      />
                      <el-checkbox
                        label="其他"
                        value="其他"
                        @change="changeLung2"
                      />
                    </el-checkbox-group>
                    <el-input
                      v-if="ruleForm9.ralesList.includes('其他')"
                      clearable
                      v-model="ruleForm9.ralesListOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="心律：" prop="heartRhythm">
                    <el-radio-group v-model="ruleForm9.heartRhythm">
                      <el-radio
                        label="齐"
                        value="齐"
                        name="heartRhythm"
                      ></el-radio>
                      <el-radio
                        label="不齐"
                        value="不齐"
                        name="heartRhythm"
                      ></el-radio>
                      <el-radio
                        label="绝对不齐"
                        value="绝对不齐"
                        name="heartRhythm"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="心率：" prop="heartRate">
                    <el-input
                      clearable
                      v-model="ruleForm9.heartRate"
                      placeholder="请输入心率"
                      ref=" "
                      :maxlength="5"
                      style="width: 250px; height: 32px"
                    >
                      <template #append>次/分钟</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="心脏杂音：" prop="heartMurmur">
                    <el-radio-group v-model="ruleForm9.heartMurmur">
                      <el-radio
                        style="margin-right: 78px"
                        label="无"
                        value="无"
                        name="heartMurmur"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="heartMurmur"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.heartMurmur == '有'"
                      clearable
                      v-model="ruleForm9.heartMurmurOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="腹部压痛：" prop="abdominalTenderness">
                    <el-radio-group v-model="ruleForm9.abdominalTenderness">
                      <el-radio
                        style="margin-right: 78px"
                        label="无"
                        value="无"
                        name="abdominalTenderness"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="abdominalTenderness"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.abdominalTenderness == '有'"
                      clearable
                      v-model="ruleForm9.abdominalTendernessOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="腹部包块：" prop="abdominalMass">
                    <el-radio-group v-model="ruleForm9.abdominalMass">
                      <el-radio
                        style="margin-right: 78px"
                        label="无"
                        value="无"
                        name="abdominalMass"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="abdominalMass"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.abdominalMass == '有'"
                      clearable
                      v-model="ruleForm9.abdominalMassOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="腹部肝大：" prop="hepatomegaly">
                    <el-radio-group v-model="ruleForm9.hepatomegaly">
                      <el-radio
                        style="margin-right: 78px"
                        label="无"
                        value="无"
                        name="hepatomegaly"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="hepatomegaly"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.hepatomegaly == '有'"
                      clearable
                      v-model="ruleForm9.hepatomegalyOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="腹部脾大：" prop="splenomegaly">
                    <el-radio-group v-model="ruleForm9.splenomegaly">
                      <el-radio
                        style="margin-right: 78px"
                        label="无"
                        value="无"
                        name="splenomegaly"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="splenomegaly"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.splenomegaly == '有'"
                      clearable
                      v-model="ruleForm9.splenomegalyOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="移动性浊音：" prop="shiftingDullness">
                    <el-radio-group v-model="ruleForm9.shiftingDullness">
                      <el-radio
                        style="margin-right: 78px"
                        label="无"
                        value="无"
                        name="shiftingDullness"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="shiftingDullness"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm9.shiftingDullness == '有'"
                      clearable
                      v-model="ruleForm9.shiftingDullnessOther"
                      placeholder="请输入"
                      :maxlength="30"
                      style="height: 32px; width: 180px; margin-left: 15px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="下肢水肿：" prop="legEdema">
                    <el-radio-group v-model="ruleForm9.legEdema">
                      <el-radio
                        style="margin-right: 70px"
                        label="无"
                        value="无"
                        name="legEdema"
                      ></el-radio>
                      <el-radio
                        style="margin-right: 70px"
                        label="单侧"
                        value="单侧"
                        name="legEdema"
                      ></el-radio>
                      <el-radio
                        style="margin-right: 70px"
                        label="双侧不对称"
                        value="双侧不对称"
                        name="legEdema"
                      ></el-radio>
                      <el-radio
                        style="margin-right: 70px"
                        label="双侧对称"
                        value="双侧对称"
                        name="legEdema"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item
                    label="足背动脉搏动："
                    prop="dorsalPulsePartList"
                  >
                    <el-checkbox-group v-model="ruleForm9.dorsalPulsePartList">
                      <el-checkbox
                        label="未触及"
                        value="未触及"
                        style="margin-right: 50px"
                        @change="changeHeart"
                      />
                      <el-checkbox
                        label="触及双侧对称"
                        value="触及双侧对称"
                        style="margin-right: 50px"
                        @change="changeHeart2"
                      />
                      <el-checkbox
                        label="触及左侧减弱或消失"
                        value="触及左侧减弱或消失"
                        style="margin-right: 50px"
                        @change="changeHeart3"
                      />
                      <el-checkbox
                        label="触及右侧减弱或消失"
                        value="触及右侧减弱或消失"
                        @change="changeHeart3"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part6"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 现存主要健康问题 -->
            <el-form
              :model="ruleForm6"
              ref="ruleFormRef6"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules6"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item
                    label="脑血管疾病："
                    prop="cerebrovascularDiseaseList"
                  >
                    <el-checkbox-group
                      v-model="ruleForm6.cerebrovascularDiseaseList"
                    >
                      <el-checkbox
                        style="margin-right: 42px"
                        @change="changeCereb"
                        label="无"
                        value="无"
                      />
                      <el-checkbox
                        style="margin-right: 42px"
                        @change="changeCereb1"
                        label="缺血性卒中"
                        value="缺血性卒中"
                      />
                      <el-checkbox
                        style="margin-right: 42px"
                        @change="changeCereb1"
                        label="脑出血"
                        value="脑出血"
                      />
                      <el-checkbox
                        style="margin-right: 42px"
                        @change="changeCereb1"
                        label="蛛网膜下腔出血"
                        value="蛛网膜下腔出血"
                      />
                      <el-checkbox
                        @change="changeCereb1"
                        label="短暂性脑缺血发作"
                        value="短暂性脑缺血发作"
                        style="margin-right: 15px"
                      />
                      <el-checkbox
                        @change="changeCereb1"
                        label="其他"
                        value="其他"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm6.cerebrovascularDiseaseList.includes('其他')"
                >
                  <el-form-item label=" " prop="cerebrovascularDiseaseOther">
                    <el-input
                      v-model="ruleForm6.cerebrovascularDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 700px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="肾脏疾病：" prop="kidneyDiseaseList">
                    <el-checkbox-group v-model="ruleForm6.kidneyDiseaseList">
                      <el-checkbox
                        @change="changeRenal"
                        style="margin-right: 51px"
                        label="无"
                        value="无"
                      />
                      <el-checkbox
                        @change="changeRenal1"
                        style="margin-right: 51px"
                        label="糖尿病肾病"
                        value="糖尿病肾病"
                      />
                      <el-checkbox
                        @change="changeRenal1"
                        style="margin-right: 51px"
                        label="肾功能衰竭"
                        value="肾功能衰竭"
                      />
                      <el-checkbox
                        @change="changeRenal1"
                        style="margin-right: 51px"
                        label="急性肾炎"
                        value="急性肾炎"
                      />
                      <el-checkbox
                        @change="changeRenal1"
                        style="margin-right: 51px"
                        label="慢性肾炎"
                        value="慢性肾炎"
                      />
                      <el-checkbox
                        @change="changeRenal1"
                        style="margin-right: 51px"
                        label="其他"
                        value="其他"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm6.kidneyDiseaseList.includes('其他')"
                >
                  <el-form-item label=" " prop="kidneyDiseaseOther">
                    <el-input
                      v-model="ruleForm6.kidneyDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 700px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="心脏疾病：" prop="heartDiseaseList">
                    <el-checkbox-group v-model="ruleForm6.heartDiseaseList">
                      <el-checkbox
                        @change="changeCardiac"
                        label="无"
                        value="无"
                      />
                      <el-checkbox
                        @change="changeCardiac1"
                        label="心肌梗死"
                        value="心肌梗死"
                      />
                      <el-checkbox
                        @change="changeCardiac1"
                        label="心绞痛"
                        value="心绞痛"
                      />
                      <el-checkbox
                        @change="changeCardiac1"
                        label="冠状动脉血管重建"
                        value="冠状动脉血管重建"
                      />
                      <el-checkbox
                        @change="changeCardiac1"
                        label="充血性心力衰竭"
                        value="充血性心力衰竭"
                      />
                      <el-checkbox
                        @change="changeCardiac1"
                        label="心前区疼痛"
                        value="心前区疼痛"
                      />
                      <el-checkbox
                        @change="changeCardiac1"
                        label="其他"
                        value="其他"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm6.heartDiseaseList.includes('其他')"
                >
                  <el-form-item label=" " prop="heartDiseaseOther">
                    <el-input
                      v-model="ruleForm6.heartDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 700px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="血管疾病：" prop="vascularDiseaseList">
                    <el-checkbox-group v-model="ruleForm6.vascularDiseaseList">
                      <el-checkbox
                        @change="changeVascular"
                        style="margin-right: 71px"
                        label="无"
                        value="无"
                      />
                      <el-checkbox
                        @change="changeVascular1"
                        style="margin-right: 71px"
                        label="夹层动脉瘤"
                        value="夹层动脉瘤"
                      />
                      <el-checkbox
                        @change="changeVascular1"
                        style="margin-right: 71px"
                        label="动脉闭塞性疾病"
                        value="动脉闭塞性疾病"
                      />
                      <el-checkbox
                        @change="changeVascular1"
                        label="其他"
                        value="其他"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm6.vascularDiseaseList.includes('其他')"
                >
                  <el-form-item label=" " prop="vascularDiseaseOther">
                    <el-input
                      v-model="ruleForm6.vascularDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 700px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="眼部疾病：" prop="eyeDiseaseList">
                    <el-checkbox-group v-model="ruleForm6.eyeDiseaseList">
                      <el-checkbox
                        @change="changeEye"
                        style="margin-right: 34px"
                        label="无"
                        value="无"
                      />
                      <el-checkbox
                        style="margin-right: 34px"
                        @change="changeEye1"
                        label="视网膜出血或渗出"
                        value="视网膜出血或渗出"
                      />
                      <el-checkbox
                        @change="changeEye1"
                        style="margin-right: 34px"
                        label="视乳头水肿"
                        value="视乳头水肿"
                      />
                      <el-checkbox
                        @change="changeEye1"
                        style="margin-right: 34px"
                        label="白内障"
                        value="白内障"
                      />
                      <el-checkbox
                        @change="changeEye1"
                        label="其他"
                        value="其他"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                  v-if="ruleForm6.eyeDiseaseList.includes('其他')"
                >
                  <el-form-item label=" " prop="eyeDiseaseOther">
                    <el-input
                      v-model="ruleForm6.eyeDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 700px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item
                    label="神经系统疾病："
                    prop="nervousSystemDisease"
                  >
                    <el-radio-group
                      v-model="ruleForm6.nervousSystemDisease"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="nervousSystemDisease"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="nervousSystemDisease"
                      ></el-radio>
                    </el-radio-group>

                    <el-input
                      v-if="ruleForm6.nervousSystemDisease == '有'"
                      v-model="ruleForm6.nervousSystemDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 160px"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item
                    label="其他系统疾病："
                    prop="otherSystemDisease"
                  >
                    <el-radio-group
                      v-model="ruleForm6.otherSystemDisease"
                      style="margin-right: 15px"
                    >
                      <el-radio
                        label="无"
                        value="无"
                        name="otherSystemDisease"
                      ></el-radio>
                      <el-radio
                        label="有"
                        value="有"
                        name="otherSystemDisease"
                      ></el-radio>
                    </el-radio-group>
                    <el-input
                      v-if="ruleForm6.otherSystemDisease == '有'"
                      v-model="ruleForm6.otherSystemDiseaseOther"
                      placeholder="请输入"
                      style="height: 32px; width: 160px"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part7"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 住院治疗情况 -->
            <el-form
              :model="ruleForm7"
              ref="ruleFormRef7"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules7"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item
                    label="住院史："
                    prop="hospitalHistoryListStatus"
                  >
                    <el-radio
                      v-model="ruleForm7.hospitalHistoryListStatus"
                      class="el-radio-n"
                      label="无"
                      value="无"
                      border
                      size="small"
                      @change="changeHospital2"
                      >无</el-radio
                    >
                    <el-radio
                      v-model="ruleForm7.hospitalHistoryListStatus"
                      class="el-radio-n"
                      label="有"
                      value="有"
                      border
                      size="small"
                      style="margin-right: 45px"
                      @change="changeHospital"
                      >有</el-radio
                    >
                  </el-form-item>
                </el-col>

                <el-row
                  :gutter="25"
                  style="
                    padding-right: 12.5px;
                    padding-left: 12.5px;
                    margin-bottom: 20px;
                  "
                  v-if="ruleForm7.hospitalHistoryListStatus == '有'"
                  v-for="(item, index) in ruleForm7.hospitalHistoryList"
                  :key="item"
                >
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20"
                  >
                    <el-form-item
                      style="margin-left: 150px"
                      :prop="
                        `hospitalHistoryList.` +
                        index +
                        `.medicalInstitutionName`
                      "
                    >
                      <el-input
                        clearable
                        style="height: 32px; width: 330px"
                        placeholder="请输入医疗机构名称"
                        v-model="item.medicalInstitutionName"
                        :maxlength="30"
                        ref="medicalInstitutionNameInput"
                        @keydown.enter.native="nextInput('reasonInput', index)"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20"
                  >
                    <el-form-item
                      label=""
                      :prop="`hospitalHistoryList.` + index + `.reason`"
                    >
                      <el-input
                        clearable
                        v-model="item.reason"
                        style="height: 32px; width: 330px"
                        placeholder="请输入原因"
                        :maxlength="30"
                        ref="reasonInput"
                        @keydown.enter.native="nextInput('admissionDateInput', index)"
                      ></el-input>
                      <el-icon
                        v-if="index == 0"
                        class="iconBox"
                        @click.prevent="addHosp"
                        ><CirclePlusFilled
                      /></el-icon>
                      <el-icon
                        v-else
                        class="iconBox"
                        @click.prevent="moveHosp(item)"
                        ><RemoveFilled
                      /></el-icon>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20 flexBox"
                    style="margin-bottom: 20px"
                  >
                    <el-form-item
                      label=""
                      style="margin-left: 150px"
                      :prop="`hospitalHistoryList.` + index + `.admissionDate`"
                      :rules="[
                        {
                          required: false,
                          validator: validateAdmissionDate,
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <!-- v-model="item.admissionDate" -->
                      <el-input
                        clearable
                        v-model="item.admissionDate"
                        style="height: 32px; width: 180px"
                        placeholder="请输入入院日期"
                        :maxlength="10"
                        ref="admissionDateInput"
                        @keydown.enter.native="nextInput('dischargeDateInput', index)"

                      >
                        <template #append> / </template>
                      </el-input>
                    </el-form-item>
                    <el-form-item
                      label=""
                      :prop="`hospitalHistoryList.` + index + `.dischargeDate`"
                      :rules="[
                        {
                          required: false,
                          validator: validateOutDate,
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        clearable
                        v-model="item.dischargeDate"
                        style="height: 32px; width: 150px"
                        placeholder="请输入出院日期"
                        :maxlength="10"
                        ref="dischargeDateInput"
                        @keydown.enter.native="nextInput('medicalRecordNumberInput', index)"

                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20"
                    style="margin-bottom: 20px"
                  >
                    <el-form-item
                      label=""
                      :prop="
                        `hospitalHistoryList.` + index + `.medicalRecordNumber`
                      "
                      :rules="[
                        {
                          required: false,
                          message: '请输入病案号',
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        clearable
                        v-model="item.medicalRecordNumber"
                        style="height: 32px; width: 330px"
                        placeholder="请输入病案号"
                        :maxlength="30"
                        ref="medicalRecordNumberInput"
                        @keydown.enter.native="nextInput('medicalInstitutionNameInput', index+1)"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item
                    label="家庭病床史："
                    prop="familyBedHistoryListStatus"
                  >
                    <el-radio
                      v-model="ruleForm7.familyBedHistoryListStatus"
                      class="el-radio-n"
                      label="无"
                      value="无"
                      border
                      size="small"
                      @change="changeHome2"
                      >无</el-radio
                    >
                    <el-radio
                      v-model="ruleForm7.familyBedHistoryListStatus"
                      class="el-radio-n"
                      label="有"
                      value="有"
                      border
                      size="small"
                      style="margin-right: 45px"
                      @change="changeHome"
                      >有</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-row
                  :gutter="25"
                  style="padding-right: 12.5px; padding-left: 12.5px"
                  v-if="ruleForm7.familyBedHistoryListStatus == '有'"
                  v-for="(item, index) in ruleForm7.familyBedHistoryList"
                  :key="item"
                >
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20"
                  >
                    <el-form-item
                      style="margin-left: 150px"
                      :prop="
                        `familyBedHistoryList.` +
                        index +
                        `.medicalInstitutionName`
                      "
                    >
                      <el-input
                        clearable
                        style="height: 32px; width: 330px"
                        placeholder="请输入医疗机构名称"
                        v-model="item.medicalInstitutionName"
                        :maxlength="30"
                        ref="medicalNameInput"
                         @keydown.enter.native="nextInput('reasonnameInput', index)"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20"
                  >
                    <el-form-item
                      label=""
                      :prop="`familyBedHistoryList.` + index + `.reason`"
                    >
                      <el-input
                        clearable
                        v-model="item.reason"
                        style="height: 32px; width: 330px"
                        placeholder="请输入原因"
                        :maxlength="30"
                        ref="reasonnameInput"
                        @keydown.enter.native="nextInput('bedDateInput', index)"
                      ></el-input>
                      <el-icon
                        v-if="index == 0"
                        class="iconBox"
                        @click.prevent="addHome"
                        ><CirclePlusFilled
                      /></el-icon>
                      <el-icon
                        v-else
                        class="iconBox"
                        @click.prevent="moveHome(item)"
                        ><RemoveFilled
                      /></el-icon>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20 flexBox"
                    style="margin-bottom: 20px"
                  >
                    <el-form-item
                      label=""
                      style="margin-left: 150px"
                      :prop="
                        `familyBedHistoryList.` + index + `.bedEstablishedDate`
                      "
                      :rules="[
                        {
                          required: false,
                          validator: validateAdmissionDate,
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <!-- v-model="item.admissionDate" -->
                      <el-input
                        clearable
                        v-model="item.bedEstablishedDate"
                        style="height: 32px; width: 180px"
                        placeholder="请输入建床日期"
                        :maxlength="10"
                        ref="bedDateInput"
                        @keydown.enter.native="nextInput('bedRemovedDateInput', index)"
                      >
                        <template #append> / </template>
                      </el-input>
                    </el-form-item>
                    <el-form-item
                      label=""
                      :prop="
                        `familyBedHistoryList.` + index + `.bedRemovedDate`
                      "
                      :rules="[
                        {
                          required: true,
                          validator: validateOutDate,
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        clearable
                        v-model="item.bedRemovedDate"
                        style="height: 32px; width: 150px"
                        placeholder="请输入撤床日期"
                        :maxlength="10"
                        ref="bedRemovedDateInput"
                        @keydown.enter.native="nextInput('medicalRecordInput', index)"
                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="24"
                    :sm="12"
                    :md="12"
                    :lg="12"
                    :xl="12"
                    class="mb20"
                    style="margin-bottom: 20px"
                  >
                    <el-form-item
                      label=""
                      :prop="
                        `familyBedHistoryList.` + index + `.medicalRecordNumber`
                      "
                    >
                      <el-input
                        clearable
                        v-model="item.medicalRecordNumber"
                        style="height: 32px; width: 330px"
                        placeholder="请输入病案号"
                        :maxlength="30"
                        ref="medicalRecordInput"
                        @keydown.enter.native="nextInput('medicalNameInput', index+1)"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part8"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 非免疫规划接种史 -->
            <el-form
              :model="ruleForm8"
              ref="ruleFormRef8"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules8"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item
                    label="非免疫规划接种史："
                    prop="nonVaccineHistoryListStatus"
                  >
                    <el-radio
                      v-model="ruleForm8.nonVaccineHistoryListStatus"
                      class="el-radio-n"
                      label="无"
                      value="无"
                      border
                      size="small"
                      @change="changeVacc2"
                      >无</el-radio
                    >
                    <el-radio
                      v-model="ruleForm8.nonVaccineHistoryListStatus"
                      class="el-radio-n"
                      label="有"
                      value="有"
                      border
                      size="small"
                      style="margin-right: 45px"
                      @change="changeVacc"
                      >有</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-row
                  :gutter="25"
                  style="padding-right: 12.5px; padding-left: 12.5px"
                  v-if="ruleForm8.nonVaccineHistoryListStatus == '有'"
                  v-for="(item, index) in ruleForm8.nonVaccineHistoryList"
                  :key="item"
                >
                  <el-col
                    :xs="10"
                    :sm="10"
                    :md="10"
                    :lg="10"
                    :xl="10"
                    class="mb20"
                    style="margin-bottom: 20px"
                  >
                    <el-form-item
                      label=""
                      style="margin-left: 150px"
                      :prop="`nonVaccineHistoryList.` + index + `.vaccineName`"
                    >
                      <el-input
                        clearable
                        v-model="item.vaccineName"
                        style="height: 32px; width: 250px"
                        placeholder="请输入疫苗名称"
                        :maxlength="10"
                        ref="vaccineNameInput"
                        @keydown.enter.native="nextInput('vaccinationDateInput', index)"
                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="4"
                    :sm="4"
                    :md="4"
                    :lg="4"
                    :xl="4"
                    class="mb20"
                    style="margin-bottom: 20px; padding: 0"
                  >
                    <el-form-item
                      label=""
                      style="margin-left: 50px"
                      :prop="
                        `nonVaccineHistoryList.` + index + `.vaccinationDate`
                      "
                      :rules="[
                        {
                          required: false,
                          validator: validateJzDate,
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        clearable
                        v-model="item.vaccinationDate"
                        style="height: 32px; width: 200px"
                        placeholder="请输入接种日期"
                        :maxlength="10"
                        ref="vaccinationDateInput"
                        @keydown.enter.native="nextInput('vaccinationSiteInput', index)"

                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :xs="10"
                    :sm="10"
                    :md="10"
                    :lg="10"
                    :xl="10"
                    class="mb20"
                    style="margin-bottom: 20px"
                  >
                    <el-form-item
                      label=""
                      style="margin-left: 100px"
                      :prop="
                        `nonVaccineHistoryList.` + index + `.vaccinationSite`
                      "
                    >
                      <el-input
                        clearable
                        v-model="item.vaccinationSite"
                        style="height: 32px; width: 250px"
                        placeholder="请输入接种机构"
                        :maxlength="10"
                        ref="vaccinationSiteInput"
                        @keydown.enter.native="nextInput('vaccineNameInput', index+1)"
                      >
                      </el-input>
                      <el-icon
                        v-if="index == 0"
                        class="iconBox"
                        @click.prevent="addVacc"
                        ><CirclePlusFilled
                      /></el-icon>
                      <el-icon
                        v-else
                        class="iconBox"
                        @click.prevent="moveVacc(item)"
                        ><RemoveFilled
                      /></el-icon>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
        
          <div
            id="part10"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 用药情况 -->
            <el-form
              :model="drugValidateForm"
              ref="drugValidateFormRef"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="drugValidateRules"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="服药依从性：" prop="medicationAdherence">
                    <el-radio-group
                      v-model="drugValidateForm.medicationAdherence"
                    >
                      <el-radio
                        label="规律"
                        value="规律"
                        name="medicationAdherence"
                      ></el-radio>
                      <el-radio
                        label="间断"
                        value="间断"
                        name="medicationAdherence"
                      ></el-radio>
                      <el-radio
                        label="不服药"
                        value="不服药"
                        name="medicationAdherence"
                      ></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="25">
                <el-col
                  :xs="21"
                  :sm="21"
                  :md="21"
                  :lg="21"
                  :xl="21"
                  class="mb20"
                >
                  <el-form-item label="药品" prop="familyBedHistoryListStatus">
                    <div
                      style="
                        border-bottom: 1px solid #ccc;
                        width: 100%;
                        height: 20px;
                      "
                    ></div>
                  </el-form-item>
                </el-col>
                <el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3" class="mb20">
                  <el-button type="primary" @click="addDrug" size="default"
                    >新增</el-button
                  >
                </el-col>
              </el-row>
              <el-row
                :gutter="25"
                style="
                  padding-right: 12.5px;
                  padding-left: 12.5px;
                  margin-bottom: 20px;
                "
                v-for="(item, index) in drugValidateForm.medicationList"
                :key="item"
              >
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20 flexBox"
                >
                  <el-col
                    :span="6"
                    style="
                      text-align: right;
                      line-height: 32px;
                      font-size: 14px;
                      color: #606266;
                    "
                    >药品名称:</el-col
                  >
                  <el-form-item
                    label=""
                    :prop="`medicationList.` + index + `.medicationName`"
                    :rules="[
                      {
                        required: true,
                        message: '药品名称不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      style="height: 32px; width: 250px"
                      @focus="getShow"
                      v-model="item.medicationName"
                      placeholder="请输入药品名称"
                      :maxlength="100"
                      clearable
                      ref="drugInput"
                       @keydown.enter.native="nextInput('medicationTimeInput', index)"
                    />
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20 flexBox"
                >
                  <el-col
                    :span="6"
                    style="
                      text-align: right;
                      line-height: 32px;
                      font-size: 14px;
                      color: #606266;
                    "
                    >用药时间:</el-col
                  >
                  <el-form-item
                    :prop="`medicationList.` + index + `.medicationTime`"
                    :rules="[
                      {
                        required: true,
                        message: '用药时间不能为空',
                        trigger: 'blur',
                      },
                    ]"
                  >
                    <el-input
                      style="height: 32px; width: 250px"
                      v-model="item.medicationTime"
                      placeholder="请输入用药时间"
                      :maxlength="10"
                      clearable
                      ref="medicationTimeInput"
                       @keydown.enter.native="nextInput('frequencyDayInput', index)"
                    />

                    <el-icon class="iconBox" @click.prevent="moveDrug(item)"
                      ><RemoveFilled
                    /></el-icon>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                >
                <el-form-item
                    :prop="`medicationList.` + index + `.medicationType`"
                    label="类型："
                  >
                  <el-radio-group
                      v-model="item.medicationType"
                    >
                      <el-radio
                        label="外院"
                        value="外院"
                        name="medicationType"
                      ></el-radio>
                      <el-radio
                        label="自购"
                        value="自购"
                        name="medicationType"
                      ></el-radio>
                      <el-radio
                        label="本院"
                        value="本院"
                        name="medicationType"
                      ></el-radio>
                    </el-radio-group>
                </el-form-item>
                
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20 flexBox"
                >
                  <el-col
                    :span="6"
                    style="
                      text-align: right;
                      line-height: 32px;
                      font-size: 14px;
                      color: #606266;
                    "
                    >频次:</el-col
                  >
                  <div style="display: flex; width: 100%">
                    <el-form-item
                      :prop="`medicationList.` + index + `.frequencyDay`"
                      :rules="[
                        {
                          required: true,
                          message: '用药频次（天）不能为空',
                          trigger: 'blur',
                        },
                        {
                          validator: (rule, value, callback) => {
                            const isNumber = /^\d+$/.test(value);
                            if (!isNumber) {
                              callback(new Error('请输入数字'));
                            } else {
                              callback();
                            }
                          },
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        style="height: 32px; width: 125px"
                        v-model="item.frequencyDay"
                        :maxlength="2"
                        clearable
                        ref="frequencyDayInput"
                        @keydown.enter.native="nextInput('frequencyCountInput', index)"
                      >
                        <template #append>天</template>
                      </el-input>
                    </el-form-item>
                    <el-form-item
                      :prop="`medicationList.` + index + `.frequencyCount`"
                      :rules="[
                        {
                          required: true,
                          message: '用药频次（次）不能为空',
                          trigger: 'blur',
                        },
                        {
                          validator: (rule, value, callback) => {
                            const isNumber = /^\d+$/.test(value);
                            if (!isNumber) {
                              callback(new Error('请输入数字'));
                            } else {
                              callback();
                            }
                          },
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        style="height: 32px; width: 125px"
                        v-model="item.frequencyCount"
                        :maxlength="2"
                        clearable
                        ref="frequencyCountInput"
                        @keydown.enter.native="nextInput('dosagePerDayInput', index)"
                      >
                        <template #append>次</template>
                      </el-input>
                    </el-form-item>
                  </div>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20 flexBox"
                >
                  <el-col
                    :span="6"
                    style="
                      text-align: right;
                      line-height: 32px;
                      font-size: 14px;
                      color: #606266;
                    "
                    >每次用量:</el-col
                  >
                  <div style="display: flex; width: 100%">
                    <el-form-item
                      :prop="`medicationList.` + index + `.dosagePerDay`"
                      :rules="[
                    {
                      required: true,
                      message: '每次用量不能为空',
                      trigger: 'blur',
                    }
                    ,
                        {
                          validator: (rule, value, callback) => {
                            const isNumber = /^\d+(\.\d+)?$/.test(value);
                            if (!isNumber) {
                              callback(new Error('请输入数字'));
                            } else {
                              callback();
                            }
                          },
                          trigger: 'blur',
                        },
                  ]"
                    >
                      <el-input
                        style="height: 32px; width: 125px"
                        v-model="item.dosagePerDay"
                        :maxlength="10"
                        clearable
                        ref="dosagePerDayInput"
                        @keydown.enter.native="nextInput('dosagePerCountInput', index)"
                      >
                        <template #append>/</template>
                      </el-input>
                    </el-form-item>
                    <el-form-item
                      :prop="`medicationList.` + index + `.dosagePerCount`"
                      :rules="[
                        {
                          required: true,
                          message: '每次用量不能为空',
                          trigger: 'blur',
                        },
                      ]"
                    >
                      <el-input
                        style="height: 32px; width: 125px"
                        v-model="item.dosagePerCount"
                        :maxlength="10"
                        ref="dosagePerCountInput"
                         @keydown.enter.native="nextInput('drugInput', index+1)"
                        
                      >
                        <template #append>单位</template>
                      </el-input>
                    </el-form-item>
                  </div>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part11"
            style="margin-top: 30px; width: 100%; box-sizing: border-box"
          >
            <!-- 体检评价 -->
            <el-form
              :model="ruleForm10"
              ref="ruleFormRef10"
              size="large"
              class="editForm"
              label-width="170px"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="21"
                  :md="21"
                  :lg="21"
                  :xl="21"
                  class="mb20"
                >
                  <el-form-item
                    label="体检是否有异常："
                    prop="examAbnormalitiesListStatus"
                  >
                    <el-radio
                      v-model="ruleForm10.examAbnormalitiesListStatus"
                      class="el-radio-n"
                      value="无"
                      border
                      size="small"
                      @change="changeHealth2"
                      >无</el-radio
                    >
                    <el-radio
                      v-model="ruleForm10.examAbnormalitiesListStatus"
                      class="el-radio-n"
                      value="有"
                      border
                      size="small"
                      @change="changeHealth"
                      >有</el-radio
                    >
                  </el-form-item>
                </el-col>
                <el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3" class="mb20">
                  <el-button type="primary" @click="addHealth" size="default"
                    >新增</el-button
                  >
                </el-col>
              </el-row>
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="flexBox"
                  v-if="ruleForm10.examAbnormalitiesListStatus == '有'"
                  v-for="(item, index) in ruleForm10.examAbnormalitiesList"
                  :key="item"
                >
                  <el-form-item
                    :label="`异常` + (index + 1) + `:`"
                    :prop="
                      `examAbnormalitiesList.` + index + `.abnormalSituation`
                    "
                  >
                    <el-input
                      v-model="item.abnormalSituation"
                      placeholder="请输入异常情况"
                      style="width: 250px; height: 32px"
                      clearable
                    ></el-input>
                    <el-icon class="iconBox" @click.prevent="moveHealth(item)"
                      ><RemoveFilled
                    /></el-icon>
                  </el-form-item>
                </el-col>
              </el-row>
              <div class="shell"></div>
            </el-form>
          </div>
          <div
            id="part12"
            style="
              margin-top: 30px;
              margin-bottom: 100px;
              width: 100%;
              box-sizing: border-box;
            "
          >
            <!-- 健康指导 -->
            <el-form
              :model="ruleForm11"
              ref="ruleFormRef11"
              size="large"
              class="editForm"
              label-width="170px"
              :rules="rules11"
            >
              <el-row :gutter="25">
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="健康指导：" prop="healthGuidanceList">
                    <el-checkbox-group v-model="ruleForm11.healthGuidanceList">
                      <el-checkbox
                        label="纳入慢性病患者健康管理"
                        value="纳入慢性病患者健康管理"
                        style="margin-right: 70px"
                      />
                      <el-checkbox
                        label="建议复查"
                        value="建议复查"
                        style="margin-right: 70px"
                        @change="headlthChange"
                      />
                      <el-checkbox
                        label="建议转诊"
                        value="建议转诊"
                        @change="headlthChange2"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>

                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="危险因素控制：" prop="riskControlList">
                    <el-checkbox-group v-model="ruleForm11.riskControlList">
                      <el-checkbox label="戒烟" value="戒烟" />
                      <el-checkbox label="健康饮酒" value="健康饮酒" />
                      <el-checkbox label="饮食" value="饮食" />
                      <el-checkbox label="锻炼" value="锻炼" />
                      <el-checkbox label="预防跌倒" value="预防跌倒" />
                      <el-checkbox label="预防骨质疏松" value="预防骨质疏松" />
                      <el-checkbox label="流感疫苗接种" value="流感疫苗接种" />
                      <el-checkbox label="肺炎疫苗接种" value="肺炎疫苗接种" />
                      <el-checkbox :label="moveWaist" :value="moveWaist" />
                      <el-checkbox :label="moveWidth" :value="moveWidth" />
                      <el-checkbox label="其他" value="其他" />
                    </el-checkbox-group>
                    <el-form-item
                      label=""
                      prop="riskControlOther"
                      v-if="ruleForm11.riskControlList.includes('其他')"
                    >
                      <el-input
                        v-model="ruleForm11.riskControlOther"
                        style="width: 500px; height: 32px"
                        clearable
                      />
                    </el-form-item>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="拒检项目：" prop="refusedTestsList">
                    <el-checkbox-group v-model="ruleForm11.refusedTestsList">
                      <el-checkbox
                        label="无"
                        value="无"
                        @change="rejectedChange"
                      />
                      <el-checkbox
                        label="血常规"
                        value="血常规"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="尿常规"
                        value="尿常规"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="肝功能"
                        value="肝功能"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="肾功能"
                        value="肾功能"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="空腹血糖"
                        value="空腹血糖"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="血脂"
                        value="血脂"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="心电图"
                        value="心电图"
                        @change="rejectedChange2"
                      />
                      <el-checkbox
                        label="腹部B超"
                        value="腹部B超"
                        @change="rejectedChange2"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20 flexBox"
                  v-if="!ruleForm11.refusedTestsList.includes('无')"
                >
                  <el-form-item label="拒检原因：" prop="refusalReasonList">
                    <el-checkbox-group v-model="ruleForm11.refusalReasonList">
                      <el-checkbox
                        style="margin-right: 35px"
                        label="病情原因"
                        value="病情原因"
                      />
                      <el-checkbox
                        style="margin-right: 35px"
                        label="没有空腹"
                        value="没有空腹"
                      />
                      <el-checkbox
                        style="margin-right: 35px"
                        label="个人原因"
                        value="个人原因"
                      />
                      <el-checkbox
                        style="margin-right: 35px"
                        label="其他"
                        value="其他"
                      />
                    </el-checkbox-group>
                  </el-form-item>
                  <el-form-item
                    label=""
                    prop="refusalReasonListOther"
                    v-if="ruleForm11.refusalReasonList.includes('其他')"
                  >
                    <el-input
                      v-model="ruleForm11.refusalReasonListOther"
                      placeholder="请输入拒检原因"
                      style="width: 250px; height: 32px"
                      clearable
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :xs="24"
                  :sm="24"
                  :md="24"
                  :lg="24"
                  :xl="24"
                  class="mb20"
                >
                  <el-form-item label="检查医生：" prop="exaDoctor">
                    <!-- <el-input
                      v-model="ruleForm11.exaDoctor"
                      placeholder="请输入检查医生"
                      style="width: 250px; height: 32px"
                      clearable
                    /> -->
                    <el-autocomplete
                      v-model.lazy="ruleForm11.exaDoctor"
                      :fetch-suggestions="querySearchAsync"
                      placeholder="请输入检查医生"
                      style="width: 250px; height: 32px"
                      clearable
                    >
                    <!-- @select="handleSelect" -->
                    </el-autocomplete>
                  </el-form-item>
                </el-col>
               
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="体检日期：" prop="exaTime">
                    <el-date-picker
                      ref="exaTimeDiabetesInput"
                      v-model="ruleForm.exaTime"
                      :disabled-date="disableFutureDates"
                      type="date"
                      format="YYYY-MM-DD"
                      value-format="YYYY-MM-DD"
                      style="width: 250px; height: 32px"
                      :teleported="false"
                    />
                  </el-form-item>
                  <!-- @keydown.enter.native="nextInput('addressInput')" -->
                </el-col>

               
                <el-col
                  :xs="24"
                  :sm="12"
                  :md="12"
                  :lg="12"
                  :xl="12"
                  class="mb20"
                >
                  <el-form-item label="下次年检日期：" prop="nextYearExaTime">
                    <el-date-picker
                      v-model="ruleForm11.nextYearExaTime"
                      disabled
                      ref="nextFollowTimeDiabetesInpu"
                      :disabled-date="disableFutureDates"
                      type="date"
                      format="YYYY-MM-DD"
                      value-format="YYYY-MM-DD"
                      style="width: 250px; height: 32px"
                      :teleported="false"
                    ></el-date-picker>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </div>
        </div>
      </el-col>
      <el-row class="main-bottom">
        <el-button @click="resetForm1">清 空</el-button>
        <el-button type="primary" @click="submit()">保 存</el-button>
      </el-row>
    </el-row>
    <el-dialog
      v-model="selfCareAssessmentVisible"
      append-to-body
      lock-scroll
      title="老年人生活自理能力评估表"
      top="3vh"
      width="80vw"
    >
      <ElderlySelfCareAssessment
        @update="updateSelfCareAssessment"
        @close="selfCareAssessmentVisible = false"
      />
    </el-dialog>
  </div>
</template>

<script lang="ts">
import ElderlySelfCareAssessment from "@/pages/examples/health/ElderlySelfCareAssessment.vue";
import { ref } from "vue";
import { debounce } from "lodash";
const disableFutureDates = (time) => time > new Date();
import { ElMessage } from "element-plus";
import http from "@/utils/request";
export default {
  components: {
    ElderlySelfCareAssessment,
  },
  emits: ["update", "close"],
  setup() {
    const containerRef = ref<HTMLElement | null>(null);
    return {
      containerRef,
    };
  },
  props: {
    dialogObj: {
      type: Object,
      default: () => ({
        isDialogVisible: false,
        editResidentsTitle: "",
        DialogDate: {},
      }),
    },
  },
  data() {
    const validtrue = (rule, value, callback) => {
      if (value == "" || value.length == 0) {
        callback(new Error("此项为必填"));
      } else {
        callback();
      }
    };
    //姓名
    const validname = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请输入姓名"));
      } else if (!/^[\u4e00-\u9fa5A-Za-z]+$/.test(value)) {
        callback(new Error("请输入正确的姓名"));
      } else {
        callback();
      }
    };
    //性别
    const validsex = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请选择性别"));
      } else {
        callback();
      }
    };
    //身份证

    const validatorIdCard = (rule, value, callback) => {
      setTimeout(() => {
        //@ts-ignore
        const value2 = this.ruleForm.cardNumber;
        if (!value2) {
          callback(new Error("请输入证件号码"));
          //@ts-ignore
        } else if (
          //@ts-ignore
          !/^\d{15}|^\d{17}[a-z]$/i.test(value2) &&
          //@ts-ignore
          this.ruleForm.cardType == "居民身份证"
        ) {
          callback(new Error("请输入正确的证件号码"));
        } else {
          callback();
        }
      }, 200);
    };
    //证件类型
    const validTypetrue = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请选择证件类型"));
      } else {
        callback();
      }
    };


    //出生日期
    const validatdateOfBirth = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请选择出生日期"));
      } else {
        callback();
      }
    };
    //体检日期
    const validatdateOfCheck = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请选择体检日期"));
      } else {
        callback();
      }
    };
    //联系方式
    const validateMobile = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入联系方式"));
      }
      //  else if (/^1[3-9]\d{9}$|^0\d{2,3}-?\d{7,8}$|^\d{7,8}$/.test(value)) {
      //   callback();
      // }
      else {
        callback();
      }
    };
    //责任医生
    const validateDoctor = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请输入责任医生"));
      } else {
        callback();
      }
    };
    //现住址
    const validateAddress = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请输入现住址"));
      } else {
        callback();
      }
    };
    //联系人
    const validateContactName = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请输入联系人姓名"));
      } else {
        callback();
      }
    };
    //联系人电话
    const validateContactPhone = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请输入联系人电话"));
      } else{
        callback();
      }
    };
    //户籍地址
    const validateAddressHousehold = (rule, value, callback) => {
      if (!value) {
        callback(new Error("请输入户籍地址"));
      } else {
        callback();
      }
    };

    //身高
    const validatheight = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入身高"));
        this.setBoxShadow("heightInput", "red");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确的身高"));
        this.setBoxShadow("heightInput", "red");
      } else if (value > 250.0 || value < 50.0) {
        callback(new Error("请输入正确的身高"));
        this.setBoxShadow("heightInput", "red");
      } else {
        if (
          (value > 250.0 && value < 220.0) ||
          (value > 50.0 && value < 120.0)
        ) {
          this.setBoxShadow("heightInput", "#f5c400");
        } else if (value > 250.0 || value < 50.0) {
          this.setBoxShadow("heightInput", "red");
        } else {
          this.setBoxShadow("heightInput", "#ccc");
        }
        callback();
      }
    };
    //体重
    const validatweight = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入体重"));
        this.setBoxShadow("weightInput", "red");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确的体重"));
        this.setBoxShadow("weightInput", "red");
      } else if (value > 300.0 || value < 20.0) {
        callback(new Error("请输入正确的体重"));
        this.setBoxShadow("weightInput", "red");
      } else {
        if (
          (value >= 100.0 && value <= 300.0) ||
          (value >= 20.0 && value <= 40.0)
        ) {
          this.setBoxShadow("weightInput", "#f5c400");
        } else if (value > 300.0 || value < 20.0) {
          this.setBoxShadow("weightInput", "red");
        } else {
          this.setBoxShadow("weightInput", "#ccc");
        }
        callback();
      }
    };
    //腰围
    const validatwaist = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入腰围"));
        this.setBoxShadow("waistInput", "red");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确的腰围"));
        this.setBoxShadow("waistInput", "red");
      } else if (value > 300.0 || value < 35.0) {
        callback(new Error("请输入正确的腰围"));
        this.setBoxShadow("waistInput", "red");
      } else {
        //@ts-ignore
        if (this.ruleForm.gender == "男") {
          if (value > 90.0 && value <= 300.0) {
            this.setBoxShadow("waistInput", "#f5c400");
          } else {
            this.setBoxShadow("waistInput", "#ccc");
          }
        }
        //@ts-ignore
        else if (this.ruleForm.gender == "女") {
          if (
            (value > 85.0 && value <= 300.0) ||
            (value >= 35.0 && value <= 60.0)
          ) {
            this.setBoxShadow("waistInput", "#f5c400");
          } else {
            this.setBoxShadow("waistInput", "#ccc");
          }
        }
        callback();
        this.setBoxShadow("waistInput", "#ccc");
      }
    };
    //体温
    const validattemperature = (rule, value, callback) => {
      if (value === "") {
        // callback(new Error("请输入体温"));
        // this.setBoxShadow("temperatureInput", "red");
        callback();
        this.setBoxShadow("temperatureInput", "#ccc");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确的体温"));
        this.setBoxShadow("temperatureInput", "red");
      } else if (value > 43.0 || value < 30.0) {
        callback(new Error("请输入正确的体温"));
        this.setBoxShadow("temperatureInput", "red");
      } else {
        if (
          (value >= 30.0 && value <= 36.2) ||
          (value >= 37.3 && value <= 43.0)
        ) {
          this.setBoxShadow("temperatureInput", "#f5c400");
        } else if (value > 43.0 || value < 30.0) {
          this.setBoxShadow("temperatureInput", "red");
        } else {
          this.setBoxShadow("temperatureInput", "#ccc");
        }

        callback();
      }
    };
    //脉率
    const validatheartRate = (rule, value, callback) => {
      if (value === "") {
        // callback(new Error("请输入脉率"));
        // this.setBoxShadow("pulseInput", "red");
        callback();
        this.setBoxShadow("pulseInput", "#ccc");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确的脉率"));
        this.setBoxShadow("pulseInput", "red");
      } else if (value > 300.0 || value < 30.0) {
        callback(new Error("请输入正确的脉率"));
        this.setBoxShadow("pulseInput", "red");
      } else {
        if ((value >= 30 && value < 60) || (value > 120 && value <= 300)) {
          this.setBoxShadow("pulseInput", "#f5c400");
        } else if (value > 300.0 || value < 30.0) {
          this.setBoxShadow("pulseInput", "red");
        } else {
          this.setBoxShadow("pulseInput", "#ccc");
        }
        callback();
      }
    };
    // 呼吸频率
    const validatbreathingFrequency = (rule, value, callback) => {
      if (value === "") {
        // callback(new Error("请输入呼吸频率"));
        // this.setBoxShadow("breathingRateInput", "red");
        callback();
        this.setBoxShadow("breathingRateInput", "#ccc");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确呼吸频率"));
        this.setBoxShadow("breathingRateInput", "red");
      } else if (value > 60.0 || value < 5.3) {
        callback(new Error("请输入正确呼吸频率"));
        this.setBoxShadow("breathingRateInput", "red");
      } else {
        if ((value >= 6 && value < 12) || (value > 20 && value <= 60)) {
          this.setBoxShadow("breathingRateInput", "#f5c400");
        } else if (value > 60 || value < 6) {
          this.setBoxShadow("breathingRateInput", "red");
        } else {
          this.setBoxShadow("breathingRateInput", "#ccc");
        }
        callback();
      }
    };
    //左侧舒张压
    const validatsystolic = (rule, value, callback) => {
      if (value === "") {
        // callback(new Error("请输入舒张压"));
        // this.setBoxShadow("leftDiastolicInput", "red");
        callback();
        this.setBoxShadow("leftDiastolicInput", "#ccc");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确舒张压"));
        this.setBoxShadow("leftDiastolicInput", "red");
      } else if (value > 140 || value < 30) {
        callback(new Error("请输入正确舒张压"));
        this.setBoxShadow("leftDiastolicInput", "red");
      } else {
        if ((value >= 90 && value <= 140) || (value >= 30 && value < 60)) {
          this.setBoxShadow("leftDiastolicInput", "#f5c400");
        } else if (value > 250 || value < 30) {
          this.setBoxShadow("leftDiastolicInput", "red");
        } else {
          this.setBoxShadow("leftDiastolicInput", "#ccc");
        }
        callback();
      }
    };
    //右侧舒张压
    const validatsystolic1 = (rule, value, callback) => {
      if (value === "") {
        callback()
        this.setBoxShadow("rightDiastolicInput", "#ccc");
        // callback(new Error("请输入舒张压"));
        // this.setBoxShadow("rightDiastolicInput", "red");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确舒张压"));
        this.setBoxShadow("rightDiastolicInput", "red");
      } else if (value > 140 || value < 30) {
        callback(new Error("请输入正确舒张压"));
        this.setBoxShadow("rightDiastolicInput", "red");
      } else {
        if ((value >= 90 && value <= 140) || (value >= 30 && value < 60)) {
          this.setBoxShadow("rightDiastolicInput", "#f5c400");
        } else if (value > 250 || value < 30) {
          this.setBoxShadow("rightDiastolicInput", "red");
        } else {
          this.setBoxShadow("rightDiastolicInput", "#ccc");
        }
        callback();
      }
    };
    // 左侧收缩压
    const validatdiastolic = (rule, value, callback) => {
      if (value === "") {
        // callback(new Error("请输入收缩压"));
        // this.setBoxShadow("leftSystolicInput", "red");
        callback();
        this.setBoxShadow("leftSystolicInput", "#ccc");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确收缩压"));
        this.setBoxShadow("leftSystolicInput", "red");
      } else if (value > 250 || value < 30) {
        callback(new Error("请输入正确收缩压"));
        this.setBoxShadow("leftSystolicInput", "red");
      } else {
        if (
          (value >= 140 && value <= 250) ||
          //@ts-ignore
          (value >= 150 && value <= 250 && this.ruleForm.age >= 65) ||
          (value >= 30 && value < 90)
        ) {
          this.setBoxShadow("leftSystolicInput", "#f5c400");
        } else if (value > 250 || value < 30) {
          this.setBoxShadow("leftSystolicInput", "red");
        } else {
          this.setBoxShadow("leftSystolicInput", "#ccc");
        }
        callback();
      }
    };
    // 右侧收缩压
    const validatdiastolic1 = (rule, value, callback) => {
      if (value === "") {
        // callback(new Error("请输入收缩压"));
        // this.setBoxShadow("rightSystolicInput", "red");
        callback()
        this.setBoxShadow("rightSystolicInput", "#ccc");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确收缩压"));
        this.setBoxShadow("rightSystolicInput", "red");
      } else if (value > 250 || value < 30) {
        callback(new Error("请输入正确收缩压"));
        this.setBoxShadow("rightSystolicInput", "red");
      } else {
        //@ts-ignore
        if (
          (value >= 140 && value <= 250) ||
          //@ts-ignore
          (value >= 150 && value <= 250 && this.ruleForm.age >= 65) ||
          (value >= 30 && value < 90)
        ) {
          this.setBoxShadow("rightSystolicInput", "#f5c400");
        } else if (value > 250 || value < 30) {
          this.setBoxShadow("rightSystolicInput", "red");
        } else {
          this.setBoxShadow("rightSystolicInput", "#ccc");
        }
        callback();
      }
    };
    //随机血糖
    const validatrandomBloodSugar = (rule, value, callback) => {
      if (value === "") {
        callback();
        this.setBoxShadow("randomGlucoseInput", "#ccc");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确随机血糖"));
        this.setBoxShadow("randomGlucoseInput", "red");
      } else if (value > 43.0 || value < 2.0) {
        callback(new Error("请输入正确随机血糖"));
        this.setBoxShadow("randomGlucoseInput", "red");
      } else {
        if (
          (value >= 10.0 && value <= 43.0) ||
          (value >= 2.0 && value <= 3.9)
        ) {
          this.setBoxShadow("randomGlucoseInput", "#f5c400");
        } else if (value > 43.0 || value < 2.0) {
          this.setBoxShadow("randomGlucoseInput", "red");
        } else {
          this.setBoxShadow("randomGlucoseInput", "#ccc");
        }
        callback();
      }
    };
    //空腹血糖
    const validatrandomBloodSugar1 = (rule, value, callback) => {
      if (value === "") {
        callback();
        this.setBoxShadow("fastingBloodGlucoseInput", "#ccc");
      } else if (!/^\d+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确空腹血糖"));
        this.setBoxShadow("fastingBloodGlucoseInput", "red");
      } else if (value > 43.0 || value < 2.0) {
        callback(new Error("请输入正确空腹血糖"));
        this.setBoxShadow("fastingBloodGlucoseInput", "red");
      } else {
        if (
          (value >= 10.0 && value <= 43.0) ||
          (value >= 2.0 && value <= 3.9)
        ) {
          this.setBoxShadow("fastingBloodGlucoseInput", "#f5c400");
        } else if (value > 43.0 || value < 2.0) {
          this.setBoxShadow("fastingBloodGlucoseInput", "red");
        } else {
          this.setBoxShadow("fastingBloodGlucoseInput", "#ccc");
        }
        callback();
      }
    };
    //每周运动次数
    const validatweeklySports = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入每周运动次数"));
        this.setBoxShadow("weeklySportsInput", "red");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确每周运动次数"));
        this.setBoxShadow("weeklySportsInput", "red");
      } else if (value > 20 || value < 0) {
        callback(new Error("请输入正确每周运动次数"));
        this.setBoxShadow("weeklySportsInput", "red");
      } else {
        if (value >= 0 && value <= 5) {
          this.setBoxShadow("weeklySportsInput", "#f5c400");
        } else if (value > 20) {
          this.setBoxShadow("weeklySportsInput", "red");
        } else {
          this.setBoxShadow("weeklySportsInput", "#ccc");
        }
        callback();
      }
    };
    //每次运动时间
    const validatweeklySportsTime = (rule, value, callback) => {
      if (value === "") {
        callback();
        this.setBoxShadow("weeklySportsTimeInput", "#ccc");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确每次运动时间"));
        this.setBoxShadow("weeklySportsTimeInput", "red");
      } else if (value > 600 || value < 0) {
        callback(new Error("请输入正确每次运动时间"));
        this.setBoxShadow("weeklySportsTimeInput", "red");
      } else {
        if (value >= 0 && value < 30) {
          this.setBoxShadow("weeklySportsTimeInput", "#f5c400");
        } else if (value > 600) {
          this.setBoxShadow("weeklySportsTimeInput", "red");
        } else {
          this.setBoxShadow("weeklySportsTimeInput", "#ccc");
        }
        callback();
      }
    };
    //坚持运动时间
    const validathabitTime = (rule, value, callback) => {
      if (!value) {
        callback();
        this.setBoxShadow("habitTimeInput", "#ccc");
      } else {
        if (!/^\d+(\.\d{1})?$/.test(value)) {
          callback(new Error("请输入正确坚持运动时间"));
          this.setBoxShadow("habitTimeInput", "red");

          //@ts-ignore
        } else if (value > this.ruleForm.age && value < 0) {
          callback(new Error("请输入正确坚持运动时间"));
          this.setBoxShadow("habitTimeInput", "red");
        } else {
          //@ts-ignore
          if (value > this.ruleForm.age) {
            this.setBoxShadow("habitTimeInput", "red");
            callback(new Error("请输入正确坚持运动时间"));
          } else {
            this.setBoxShadow("habitTimeInput", "#ccc");
          }
          callback();
        }
      }
    };
    //运动方式
    const validatweeklySportsType = (rule, value, callback) => {
      if (value === "") {
        callback();
      } else {
        callback();
      }
    };
    //日吸烟量
    const validatdailySmoke = (rule, value, callback) => {
      if (!value) {
        callback();
        this.setBoxShadow("dailySmokeInput", "#ccc");
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确日吸烟量"));
        this.setBoxShadow("dailySmokeInput", "red");
      } else if (value > 100 || value < 0) {
        callback(new Error("请输入正确日吸烟量"));
        this.setBoxShadow("dailySmokeInput", "red");
      } else {
        if (value > 20 && value <= 100) {
          this.setBoxShadow("dailySmokeInput", "#f5c400");
        } else if (value > 100) {
          this.setBoxShadow("dailySmokeInput", "red");
        } else {
          this.setBoxShadow("dailySmokeInput", "#ccc");
        }
        callback();
        this.setBoxShadow("dailySmokeInput", "#ccc");
      }
    };
    //开始吸烟年龄
    const validatstartSmoke = (rule, value, callback) => {
      if (!value) {
        callback();
      } else {
        if (!/^\d+$/.test(value)) {
          callback(new Error("请输入正确开始吸烟年龄"));
          this.setBoxShadow("startSmokeInput", "red");
          //@ts-ignore
        } else if (value > this.ruleForm.age || value == 0) {
          callback(new Error("请输入正确开始吸烟年龄"));
          this.setBoxShadow("startSmokeInput", "red");
        } else {
          //@ts-ignore
          if (value >= 0 && value > this.ruleForm.age) {
            this.setBoxShadow("startSmokeInput", "red");
          } else {
            this.setBoxShadow("startSmokeInput", "#ccc");
          }
          callback();
        }
      }
    };
    //戒烟年龄
    const validatquitSmoke = (rule, value, callback) => {
      if (!value) {
        callback();
      } else {
        if (!/^\d+$/.test(value)) {
          callback(new Error("请输入正确戒烟年龄"));
          this.setBoxShadow("quitSmokeInput", "red");
        } else if (
          //@ts-ignore
          value > this.ruleForm.age ||
          value == 0 ||
          //@ts-ignore
          value < this.ruleForm4.startSmokingAge
        ) {
          callback(new Error("请输入正确戒烟年龄"));
          this.setBoxShadow("quitSmokeInput", "red");
        } else {
          //@ts-ignore
          if (value >= 0 && value > this.ruleForm.age) {
            this.setBoxShadow("quitSmokeInput", "red");
          } else {
            this.setBoxShadow("quitSmokeInput", "#ccc");
          }
          callback();
        }
      }
    };
    //日饮酒量
    const validatdailyDrink = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!/^\d+$/.test(value)) {
        callback(new Error("请输入正确日饮酒量"));
        this.setBoxShadow("dailyDrinkInput", "red");
      } else if (value > 50 || value < 0) {
        callback(new Error("请输入正确日饮酒量"));
        this.setBoxShadow("dailyDrinkInput", "red");
      } else {
        if (value > 10 && value <= 50) {
          this.setBoxShadow("dailyDrinkInput", "#f5c400");
        } else if (value > 50) {
          this.setBoxShadow("dailyDrinkInput", "red");
        } else {
          this.setBoxShadow("dailyDrinkInput", "#ccc");
        }
        callback();
      }
    };
    //开始饮酒年龄
    const validatstartDrink = (rule, value, callback) => {
      if (!value) {
        callback();
      } else {
        if (!/^\d+$/.test(value)) {
          callback(new Error("请输入正确开始饮酒年龄"));
          this.setBoxShadow("startDrinkInput", "red");
          //@ts-ignore
        } else if (value > this.ruleForm.age || value == 0) {
          callback(new Error("请输入正确开始饮酒年龄"));
          this.setBoxShadow("startDrinkInput", "red");
        } else {
          //@ts-ignore
          if (value >= 0 && value > this.ruleForm.age) {
            this.setBoxShadow("startDrinkInput", "red");
          } else {
            this.setBoxShadow("startDrinkInput", "#ccc");
          }
          callback();
        }
      }
    };
    //戒酒年龄
    const validatquitDrink = (rule, value, callback) => {
      if (!value) {
        callback();
      } else {
        if (!/^\d+$/.test(value)) {
          callback(new Error("请输入正确戒酒年龄"));
          this.setBoxShadow("quitDrinkInput", "red");
          //@ts-ignore
        } else if (
          //@ts-ignore
          value > this.ruleForm.age ||
          value == 0 ||
          //@ts-ignore
          value < this.ruleForm4.startDrinkingAge
        ) {
          callback(new Error("请输入正确戒酒年龄"));
          this.setBoxShadow("quitDrinkInput", "red");
        } else {
          //@ts-ignore
          if (value >= 0 && value > this.ruleForm.age) {
            this.setBoxShadow("quitDrinkInput", "red");
          } else {
            this.setBoxShadow("quitDrinkInput", "#ccc");
          }
          callback();
        }
      }
    };
    //从业时间
    const validatYears = (rule, value, callback) => {
      if (!value) {
        callback();
      } else {
        if (!/^\d+$/.test(value)) {
          callback(new Error("请输入正确从业时间"));
          this.setBoxShadow("yearsOfServiceInput", "red");
          //@ts-ignore
        } else if (value > this.ruleForm.age || value < 0) {
          callback(new Error("请输入正确从业时间"));
          this.setBoxShadow("yearsOfServiceInput", "red");
        } else {
          //@ts-ignore
          if (value >= 0 && value > this.ruleForm.age) {
            this.setBoxShadow("yearsOfServiceInput", "red");
          } else {
            this.setBoxShadow("yearsOfServiceInput", "#ccc");
          }
          callback();
        }
      }
    };
    // #f5c400
    //左侧裸眼视力
    const validleftEye = (rule, value, callback) => {
      if (value === "" || value === "0") {
        callback(new Error("请输入左侧裸眼视力"));
        this.setBoxShadow("leftEyeInput", "red");
      } else if (!/^[\d\u4e00-\u9fa5]+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确左侧裸眼视力"));
        this.setBoxShadow("leftEyeInput", "red");
        //@ts-ignore
      } else if (value > 5.3 || value < 0.0 || (value > 2.0 && value < 4.0)) {
        callback(new Error("请输入正确左侧裸眼视力"));
        this.setBoxShadow("leftEyeInput", "red");
      } else {
        //@ts-ignore
        if (value > 5.3) {
          this.setBoxShadow("leftEyeInput", "red");
        } else if (
          (value >= 4.0 && value < 5.0) ||
          (value >= 0.1 && value < 1.0)
        ) {
          this.setBoxShadow("leftEyeInput", "#f5c400");
        } else {
          this.setBoxShadow("leftEyeInput", "#ccc");
        }
        callback();
      }
    };
    //右侧裸眼视力
    const validleftEye1 = (rule, value, callback) => {
      if (value === "" || value === "0") {
        callback(new Error("请输入右侧裸眼视力"));
        this.setBoxShadow("rightEyeInput", "red");
      } else if (!/^[\d\u4e00-\u9fa5]+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确右侧裸眼视力"));
        this.setBoxShadow("rightEyeInput", "red");
        //@ts-ignore
      } else if (value > 5.3 || value < 0.0 || (value > 2.0 && value < 4.0)) {
        callback(new Error("请输入正确右侧裸眼视力"));
        this.setBoxShadow("rightEyeInput", "red");
      } else {
        //@ts-ignore
        if (value > 5.3) {
          this.setBoxShadow("rightEyeInput", "red");
        } else if (
          (value >= 4.0 && value < 5.0) ||
          (value >= 0.1 && value < 1.0)
        ) {
          this.setBoxShadow("rightEyeInput", "#f5c400");
        } else {
          this.setBoxShadow("rightEyeInput", "#ccc");
        }
        callback();
      }
    };
    //左侧矫正视力
    const validrightEye = (rule, value, callback) => {
      if (value === "" || value === "0") {
        callback(new Error("请输入左侧矫正视力"));
        this.setBoxShadow("leftjzEyeInput", "red");
      } else if (!/^[\d\u4e00-\u9fa5]+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确左侧矫正视力"));
        this.setBoxShadow("leftjzEyeInput", "red");
        //@ts-ignore
      } else if (value > 5.3 || value < 0.0 || (value > 2.0 && value < 4.0)) {
        callback(new Error("请输入正确左侧矫正视力"));
        this.setBoxShadow("leftjzEyeInput", "red");
      } else {
        if (value > 5.3) {
          this.setBoxShadow("leftjzEyeInput", "red");
        } else if (
          (value >= 4.0 && value < 5.0) ||
          (value >= 0.1 && value < 1.0)
        ) {
          this.setBoxShadow("leftjzEyeInput", "#f5c400");
        } else {
          this.setBoxShadow("leftjzEyeInput", "#ccc");
        }
        callback();
      }
    };
    //右侧矫正视力
    const validrightEye1 = (rule, value, callback) => {
      if (value === "" || value === "0") {
        callback(new Error("请输入右侧矫正视力"));
        this.setBoxShadow("rightjzEyeInput", "red");
      } else if (!/^[\d\u4e00-\u9fa5]+(\.\d)?$/.test(value)) {
        callback(new Error("请输入正确右侧矫正视力"));
        this.setBoxShadow("rightjzEyeInput", "red");
        //@ts-ignore
      } else if (value > 5.3 || value < 0.0 || (value > 2.0 && value < 4.0)) {
        callback(new Error("请输入正确右侧矫正视力"));
        this.setBoxShadow("rightjzEyeInput", "red");
      } else {
        if (value > 5.3) {
          this.setBoxShadow("rightjzEyeInput", "red");
        } else if (
          (value >= 4.0 && value < 5.0) ||
          (value >= 0.1 && value < 1.0)
        ) {
          this.setBoxShadow("rightjzEyeInput", "#f5c400");
        } else {
          this.setBoxShadow("rightjzEyeInput", "#ccc");
        }
        callback();
      }
    };
    //足背动脉搏
    const validPartList = (rule, value, callback) => {
      if (
        //@ts-ignore
        this.ruleForm2.populationCategoryList.includes("糖尿病") &&
        value.length < 1
      ) {
        callback(new Error("请选择足背动脉搏动"));
      } else {
        callback();
      }
    };
    return {
      timeout: null,
      selfCareAssessmentVisible: false,
      timeDate: "",
      isshow: true,
      tipshow: true,
      referral: false,
      referral2: false,
      healthTrue: false,
      showName: "",
      showCardnumber: "",
      // 基本信息
      ruleForm: {
        //姓名
        name: "",
        //身份证
        cardNumber: "",
        //证件类型
        cardType: "居民身份证",
        //性别
        gender: "",
        //出生日期
        birthday: "",
        //联系方式
        phoneNumber: "",
        //体检日期
        exaTime: "",
        // 责任医生
        // respDoctor: "",
        // 年龄
        age: 0,
        //现住址
        address: "",
        //联系人
        contacts:"",
        //联系人电话
        contactsNumber:"",
        //户籍地址
        domicileAddress:"",

      },
      rules: {
        name: [{ required: true, validator: validname, trigger: "blur" }],
        gender: [{ required: true, validator: validsex, trigger: "blur" }],
        cardNumber: [
          { required: true, validator: validatorIdCard, trigger: "blur" },
        ],
        birthday: [
          { required: true, validator: validatdateOfBirth, trigger: "blur" },
        ],
        phoneNumber: [
          { required: true, validator: validateMobile, trigger: "blur" },
        ],
        // respDoctor: [
        //   { required: true, validator: validateDoctor, trigger: "blur" },
        // ],
        cardType: [{ required: true, validator: validTypetrue, trigger: "blur" }],
        // exaTime: [
        //   { required: true, validator: validatdateOfCheck, trigger: "blur" },
        // ],
        // age: [{ required: true, validator: validtrue, trigger: "blur" }],
        address: [
          { required: true, validator: validateAddress, trigger: "blur" },
        ],
        contacts: [{ required: true, validator: validateContactName, trigger: "blur" }],
        contactsNumber: [{ required: true, validator: validateContactPhone, trigger: "blur" }],
        domicileAddress: [{ required: true, validator: validateAddressHousehold, trigger: "blur" }],
      },
      // 分类及症状
      ruleForm2: {
        //人群分类
        populationCategoryList: [],
        //人群分类其他
        populationCategoryOther: "",
        //人群分类输入框显示
        crowdInput: false,
        //症状
        symptomList: ["无症状"],
        //症状其他
        symptomOther: "",
        //症状输入框显示
        symptomInput: false,
      },
      rules2: {
        populationCategoryList: [
          { required: true, validator: validtrue, trigger: "blur" },
        ],
        symptomList: [
          { required: true, validator: validtrue, trigger: "blur" },
        ],
      },
      // 一般情况
      ruleForm3: {
        height: "",
        //  身高（单位：厘米）
        weight: "",
        // 体重（单位：千克）
        waist: "",
        //  腰围（单位：厘米）
        temperature: "",
        //  体温（单位：摄氏度）
        pulse: "",
        //  脉率（单位：次/分钟）
        breathingRate: "",
        //  呼吸频率（单位：次/分钟）
        leftSystolic: "",
        //  左侧收缩压（单位：毫米汞柱）
        leftDiastolic: "",
        //  左侧舒张压（单位：毫米汞柱）
        rightSystolic: "",
        //  右侧收缩压（单位：毫米汞柱）
        rightDiastolic: "",
        //  右侧舒张压（单位：毫米汞柱）
        randomGlucose: "",
        //  随机血糖（单位：毫克/分升）
        fastingBloodGlucose:"",
        //  空腹血糖（单位：毫克/分升）
        healthSelfRating: "",
        // 健康状态自我评估
        cognition: "",
        // 认知功能
        elderlySelfCareScore: "",
        // 生活自理能力评估
        elderlyScoreId: "",
        // 老年人生活自理能力检查表id
        residentId: "", //老年人id
        //差值显示
        heightShow: false,
        heightmsg: "",
        weightShow: false,
        weightmsg: "",
        waistShow: false,
        waistmsg: "",
        height1: "",
        weight1: "",
        waist1: "",

        // BMI
      },
      rules3: {
        height: [{ required: true, validator: validatheight, trigger: "blur" }],
        weight: [{ required: true, validator: validatweight, trigger: "blur" }],
        waist: [
          {
            required: true,
            validator: validatwaist,
            trigger: "blur",
          },
        ],
        //  腰围（单位：厘米）
        temperature: [
          {
            required: false,
            validator: validattemperature,
            trigger: "blur",
          },
        ],
        //  体温（单位：摄氏度）
        pulse: [
          { required: false, validator: validatheartRate, trigger: "blur" },
        ],
        //  脉率（单位：次/分钟）
        breathingRate: [
          {
            required: false,
            validator: validatbreathingFrequency,
            trigger: "blur",
          },
        ],
        //  呼吸频率（单位：次/分钟）
        leftSystolic: [
          {
            required: false,
            validator: validatdiastolic,
            trigger: "blur",
          },
        ],
        //  左侧收缩压（单位：毫米汞柱）
        leftDiastolic: [
          {
            required: false,
            validator: validatsystolic,
            trigger: "blur",
          },
        ],
        //  左侧舒张压（单位：毫米汞柱）
        rightSystolic: [
          {
            required: false,
            validator: validatdiastolic1,
            trigger: "blur",
          },
        ],
        //  右侧收缩压（单位：毫米汞柱）
        rightDiastolic: [
          {
            required: false,
            validator: validatsystolic1,
            trigger: "blur",
          },
        ],
        //  右侧舒张压（单位：毫米汞柱）
        randomGlucose: [
          {
            validator: validatrandomBloodSugar,
            trigger: "blur",
          },
          //随机血糖（单位：毫克/分升）
        ],
        fastingBloodGlucose:[
          {
            validator: validatrandomBloodSugar1,
            trigger: "blur",
          },
          //随机血糖（单位：毫克/分升）
        ],
        healthSelfRating: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        cognition: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        elderlySelfCareScore: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },
      //生活方式
      ruleForm4: {
        weeklyExercises: "",
        //  每周运动次数（单位：次）
        exerciseTime: "",
        //  每次运动时间（单位：分钟）
        exerciseYears: "",
        //  坚持运动时间（单位：年）
        exerciseType: "",
        //  运动方式（例如：跑步、游泳、瑜伽等）
        dietPartTwo: [],
        //  饮食习惯（例如：素食、荤食、高蛋白饮食等）
        dietPartOne: "荤素均衡",
        //  饮食习惯（例如：素食、荤食、高蛋白饮食等）
        smoking: "从不吸烟",
        //  吸烟情况（例如：从不吸烟、偶尔吸烟、每天吸烟）
        dailySmoke: "",
        //  日吸烟量（单位：支）
        startSmokingAge: "",
        //  开始吸烟年龄（单位：岁）
        quitSmokingAge: "",
        //  戒烟年龄（单位：岁）
        drinkingFrequency: "从不",
        //  饮酒频率（例如：从不饮酒、偶尔饮酒、每天饮酒）
        dailyDrinkAmount: "",
        //  日饮酒量（单位：克或毫升）
        drunkInPastYear: "",
        //  近一年是否曾醉酒（布尔值：是/否）
        startDrinkingAge: "",
        //  开始饮酒年龄（单位：岁）
        quitDrinking: "",
        //  是否戒酒（布尔值：是/否）
        quitDrinkingAge: "",
        //  戒酒年龄（单位：岁）
        drinkTypeList: [],
        //  饮酒种类（例如：白酒、啤酒、红酒等）
        drinkTypeListOther: "",
        // 其它饮酒种类
        jobHazards: "无",
        //  职业危害因素
        specificJob: "",
        // 具体职业
        yearsOfService: "",
        // 从业时间
        otherHazards: "",
        // 化学物质
        otherProtection: "",
        // 化学物质状态
        otherProtectionOther: "",
        // 化学物质措施
        durationShow: true,
        // 每次运动时间 是否显示
      },
      rules4: {
        weeklyExercises: [
          { required: true, validator: validatweeklySports, trigger: "blur" },
        ],
        //  每周运动次数（单位：次）
        exerciseTime: [
          {
            // required: true,
            validator: validatweeklySportsTime,
            trigger: "blur",
          },
        ],
        //  每次运动时间（单位：分钟）
        exerciseYears: [
          {
            // required: true,
            validator: validathabitTime,
            trigger: "blur",
          },
        ],
        // 坚持运动时间
        exerciseType: [
          {
            // required: true,
            validator: validatweeklySportsType,
            trigger: "blur",
          },
        ],
        //运动方式
        dietPartOne: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //饮食习惯
        smoking: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //吸烟情况
        dailySmoke: [
          {
            // required: true,
            validator: validatdailySmoke,
            trigger: "blur",
          },
        ],
        //日吸烟量
        startSmokingAge: [
          {
            // required: true,
            validator: validatstartSmoke,
            trigger: "blur",
          },
        ],
        //开始吸烟年龄
        quitSmokingAge: [
          {
            // required: true,
            validator: validatquitSmoke,
            trigger: "blur",
          },
        ],
        //  戒烟年龄（单位：岁）
        drinkingFrequency: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //饮酒频率
        dailyDrinkAmount: [
          {
            // required: true,
            validator: validatdailyDrink,
            trigger: "blur",
          },
        ],
        //日饮酒量

        startDrinkingAge: [
          {
            // required: true,
            validator: validatstartDrink,
            trigger: "blur",
          },
        ],
        //开始饮酒年龄
        quitDrinkingAge: [
          {
            // required: true,
            validator: validatquitDrink,
            trigger: "blur",
          },
        ],
        //  戒烟年龄（单位：岁）
        jobHazards: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //职业危害因素
        yearsOfService: [
          {
            validator: validatYears,
            trigger: "blur",
          },
        ],
      },
      //脏器功能
      ruleForm5: {
        lips: "红润",
        //  口唇
        throatList: ["无充血"],
        //  咽部
        teethAlignmentList: ["正常"],
        //齿列
        missingTeethList: [],
        // 缺齿集合
        missing_teeth_top_left: "",
        // 缺齿左上
        missing_teeth_bottom_left: "",
        // 缺齿左下
        missing_teeth_top_right: "",
        // 缺齿右上
        missing_teeth_bottom_right: "",
        // 缺齿右下

        cavitiesList: [],
        //  龋齿集合
        cavities_top_left: "",

        cavities_bottom_left: "",

        cavities_top_right: "",

        cavities_bottom_right: "",

        denturesList: [],
        //  义齿集合
        dentures_top_left: "",

        dentures_bottom_left: "",

        dentures_top_right: "",

        dentures_bottom_right: "",

        vision: "裸眼视力",
        //视力集合
        visionList: [],
        leftEye: "",
        //左眼裸眼视力
        rightEye: "",
        //右眼裸眼视力
        leftjzEye: "",
        //左眼矫正视力
        rightjzEye: "",
        //右眼矫正视力
        hearing: "听见",
        //听力
        motorFunction: "可顺利完成",
        //运动功能
      },
      rules5: {
        lips: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        throatList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        teethAlignmentList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        vision: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        leftEye: [
          {
            required: true,
            validator: validleftEye,
            trigger: "blur",
          },
        ],
        rightEye: [
          {
            required: true,
            validator: validleftEye1,
            trigger: "blur",
          },
        ],

        leftjzEye: [
          {
            required: true,
            validator: validrightEye,
            trigger: "blur",
          },
        ],
        rightjzEye: [
          {
            required: true,
            validator: validrightEye1,
            trigger: "blur",
          },
        ],

        hearing: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        motorFunction: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },
      // 现存主要健康问题
      ruleForm6: {
        cerebrovascularDiseaseList: ["无"],
        //  脑血管疾病
        cerebrovascularDiseaseOther: "",
        //  脑血管疾病其他
        kidneyDiseaseList: ["无"],
        //  肾脏疾病
        kidneyDiseaseOther: "",
        //  肾脏疾病其他
        heartDiseaseList: ["无"],
        //  心脏疾病
        heartDiseaseOther: "",
        //  心脏疾病其他
        vascularDiseaseList: ["无"],
        //  血管疾病
        vascularDiseaseOther: "",
        //  血管疾病其他
        eyeDiseaseList: ["无"],
        //  眼部疾病
        eyeDiseaseOther: "",
        //  眼部疾病其他
        nervousSystemDisease: "无",
        //  神经系统疾病
        nervousSystemDiseaseOther: "",
        //  神经系统疾病输入
        otherSystemDisease: "无",
        //  其他系统疾病
        otherSystemDiseaseOther: "",
        //  其他系统疾病输入
      },
      rules6: {
        cerebrovascularDiseaseList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        kidneyDiseaseList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        heartDiseaseList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        vascularDiseaseList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        eyeDiseaseList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        nervousSystemDisease: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        otherSystemDisease: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },
      // 住院治疗情况
      ruleForm7: {
        // 病案号
        hospitalHistoryListStatus: "无",
        //  住院史
        hospitalHistoryList: [
          // {
          //   medicalInstitutionName: "",
          //   //   医疗机构名称
          //   reason: "",
          //   //  入院原因
          //   admissionDate: "",
          //   // 入院日期
          //   dischargeDate: "",
          //   // 出院日期
          //   medicalRecordNumber: "",
          //   //   病案号
          // },
        ],

        familyBedHistoryListStatus: "无",
        //  家庭病床史
        familyBedHistoryList: [
          // {
          //   medicalInstitutionName: "",
          //   //   医疗机构名称
          //   reason: "",
          //   //  入院原因
          //   bedEstablishedDate: "",
          //   // 建床日期
          //   bedRemovedDate: "",
          //   // 撤床日期
          //   medicalRecordNumber: "",
          //   //   病案号
          // },
        ],
      },
      rules7: {
        hospitalHistoryListStatus: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        familyBedHistoryListStatus: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },
      //非免疫规划接种史
      ruleForm8: {
        nonVaccineHistoryListStatus: "无",
        //  非免疫规划接种史
        nonVaccineHistoryList: [
          // {
          //   vaccineName: "",
          //   //   疫苗名称
          //   vaccinationDate: "",
          //   //  接种日期
          //   vaccinationSite: "",
          //   //接种机构
          // },
        ],
      },
      rules8: {
        nonVaccineHistoryListStatus: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },
      //查体
      ruleForm9: {
        skin: "正常",
        //  皮肤
        skinOther: "",
        //  皮肤其他
        sclera: "正常",
        //  巩膜
        scleraOther: "",
        //  巩膜其他
        lymphNodesList: ["未触及"],
        //  淋巴结
        lymphNodesOther: "",
        //  淋巴结其他
        barrelChest: "否",
        //  肺部桶状胸
        breathSounds: "正常",
        //  肺部呼吸音
        breathSoundsOther: "",
        //  肺部呼吸音异常
        ralesList: ["无"],
        //  肺部啰音
        ralesListOther: "",
        //  肺部啰音其他
        heartRhythm: "齐",
        //  心律
        heartRate: "",
        //  心率
        heartMurmur: "无",
        //  心脏杂音
        heartMurmurOther: "",
        //  心脏杂音其他

        abdominalTenderness: "无",
        //  腹部压痛
        abdominalTendernessOther: "",
        //  腹部压痛其他
        abdominalMass: "无",
        //  腹部包块
        abdominalMassOther: "",
        //  腹部包块其他
        hepatomegaly: "无",
        //  腹部肝大
        hepatomegalyOther: "",
        //  腹部肝大其他
        splenomegaly: "无",
        //  腹部脾大
        splenomegalyOther: "",
        //  腹部脾大其他
        shiftingDullness: "无",
        //  移动性浊音
        shiftingDullnessOther: "",
        //  移动性浊音其他
        legEdema: "无",
        //  下肢水肿
        dorsalPulsePartList: [],
        //  足背动脉搏动
      },
      rules9: {
        skin: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        skinOther: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  皮肤其他
        sclera: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  巩膜
        lymphNodesList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  淋巴结
        barrelChest: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  肺部桶状胸
        breathSounds: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  肺部呼吸音
        ralesList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  肺部啰音
        heartRhythm: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  心律
        // heartRate: [
        //   {
        //     required: false,
        //     validator: validtrue,
        //     trigger: "blur",
        //   },
        // ],
        //  心率
        heartMurmur: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  心脏杂音
        abdominalTenderness: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  腹部压痛
        abdominalMass: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  腹部包块
        hepatomegaly: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  腹部肝大
        splenomegaly: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  腹部脾大
        shiftingDullness: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  移动性浊音
        legEdema: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        //  下肢水肿
        dorsalPulsePartList: [
          {
            validator: validPartList,
            trigger: "blur",
          },
        ],
        //  足背动脉搏动
      },
      //用药情况
      drugValidateForm: {
        medicationList: [
          //   {
          //   medicationName: "",
          //   //  药品名称
          //   medicationTime: "",
          //   //  用药时间
          //   frequencyDay: "",
          //   //  频次天
          //  frequencyCount : "",
          //   //  频次
          //   dosagePerDay: "",
          //   //  剂量
          //   dosagePerCount: "",
          //  //  剂量单位
          // }
        ],
        //服药依从性
        medicationAdherence: "规律",
        //药品
      },
      drugValidateRules: {
        medicationAdherence: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },

      // 体检评价
      ruleForm10: {
        examAbnormalitiesListStatus: "无",
        //  异常
        examAbnormalitiesList: [
          //   {
          //   abnormalSituation:''
          // }
        ],
      },
      // 减腰围
      moveWaist: "减腰围(目标        CM)",
      //减体重
      moveWidth: "减体重(目标        KG)",
      addWidth: "增体重(目标        KG)",
      //健康指导
      ruleForm11: {
        healthGuidanceList: [],
        //  健康指导

        riskControlList: ["饮食", "锻炼"],
        //  危险因素控制

        riskControlOther: "",
        //危险控制因素其他
        refusedTestsList: ["无"],
        //拒检项目

        refusalReasonList: [],
        //拒检原因
        refusalReasonListOther: "",
        //拒检原因其他
        // examination_date: "",
        //  体检日期
        exaDoctor: "",
        //  体检医生
        nextYearExaTime: "",
        //  下次年检日期
      },
      rules11: {
        // healthGuidanceList: [
        //   {
        //     required: true,
        //     validator: validtrue,
        //     trigger: "blur",
        //   },
        // ],
        // riskControlList: [
        //   {
        //     required: true,
        //     validator: validtrue,
        //     trigger: "blur",
        //   },
        // ],
        refusedTestsList: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
        nextYearExaTime: [
          {
            required: true,
            validator: validtrue,
            trigger: "blur",
          },
        ],
      },
    };
  },

  methods: {
    disableFutureDates,
    getbirthday() {
      // if (
      //   this.ruleForm.cardNumber &&
      //   this.ruleForm.cardNumber.length === 18
      //   &&
      //   this.ruleForm.birthday == ""
      //   &&
      //   this.ruleForm.cardType == "居民身份证"
      // ) {
      //   const birthday = this.ruleForm.cardNumber.substring(6, 14);
      //   this.ruleForm.birthday =
      //     birthday.substring(0, 4) +
      //     "-" +
      //     birthday.substring(4, 6) +
      //     "-" +
      //     birthday.substring(6, 8);
      // }
      if (
        this.ruleForm.cardNumber &&
        this.ruleForm.cardNumber.length === 18 &&
        this.ruleForm.cardType == "居民身份证"
      ) {
        const birthday = this.ruleForm.cardNumber.substring(6, 14);

        // this.ruleForm.birthday =
        //   birthday.substring(0, 4) +
        //   "-" +
        //   birthday.substring(4, 6) +
        //   "-" +
        //   birthday.substring(6, 8);
        const cardNumber = this.ruleForm.cardNumber;

        // 1. 获取出生日期部分 (第7到14位)
        const birthdayPart = cardNumber.substring(6, 14);
        // 正则校验是否为有效日期格式
        const dateRegex = /^(\d{4})(\d{2})(\d{2})$/;
        if (dateRegex.test(birthdayPart)) {
          const [, year, month, day] = birthdayPart.match(dateRegex);

          // 校验日期有效性
          const birthDate = new Date(`${year}-${month}-${day}`);
          if (
            birthDate.getFullYear() === parseInt(year) &&
            birthDate.getMonth() + 1 === parseInt(month) &&
            birthDate.getDate() === parseInt(day)
          ) {
            // 设置出生日期
            this.ruleForm.birthday = `${year}-${month}-${day}`;
          } else {
            this.ruleForm.birthday = ""; // 重置
          }
        } else {
          this.ruleForm.birthday = ""; // 重置
        }

        // 2. 判断性别（第17位：奇数男，偶数女）
        const genderDigit = parseInt(cardNumber.charAt(16), 10);
        if (!isNaN(genderDigit)) {
          this.ruleForm.gender = genderDigit % 2 === 0 ? "女" : "男";
        } else {
          this.ruleForm.gender = ""; // 重置
        }
      }
    },
    querySearchAsync(queryString, cb) {
      clearTimeout(this.timeout);
      let results = [];
        // 掉接口需要的参数
        this.timeout = setTimeout(() => {
          const find = {
            name: queryString,
          };
       
          http
            .get("/health/searchDoctor",find)
            .then((res) => {
              //@ts-ignore
              if (res.data.length > 0) {
                res.data.forEach(v => {
                  results.push({
                    value: v.name,
                    name: v.name,
                  });
                });
                cb(results);
              } else {
                results = [];
                cb(results);
              
              }
            });
        }, 1000);
    },
//点击基本信息
handeleMssage(){
  document.querySelector(".content_box").scrollTop = 0;
  
},
    // 处理 focus 事件
    handleFocus() {
      if (!this.ruleForm.name) {
        // 手动调用 el-autocomplete 的隐藏方法
        this.$refs.NameInput.suggestions = [];
      }
    },

    //身份证模糊查询
    queryCarNumberAsync: debounce(function (queryString, cb) {
      let results = [];
      queryString = queryString.trim();
      if (!queryString || this.showCardnumber == queryString) {
        cb([]);
        return;
      }
      const find = {
        cardNumber: queryString,
      };

      http
        .post("/health/getResidentList", find)
        .then((res) => {
          if (res.data) {
            res.data.forEach((v) => {
              results.push({
                value: v.cardNumber + " " + v.name,
                cardNumber: v.cardNumber,
                name: v.name,
              });
            });
            cb(results);
          } else {
            // cb([]);
          }
        })
        .catch((error) => {
          console.error("Error fetching data:", error);
          cb([]);
        });
    }, 500), // 300ms 的防抖延时

    handleSelect(item) {
      this.ruleForm.cardNumber = item.cardNumber;
      http
        .post("/health/getHealthInformation", { cardNumber: item.cardNumber })
        .then((res) => {
          const forms = [
            "ruleForm",
            "ruleForm2",
            "ruleForm3",
            "ruleForm4",
            "ruleForm5",
            "ruleForm6",
            "ruleForm7",
            "ruleForm8",
            "ruleForm9",
            "drugValidateForm",
            "ruleForm10",
            "ruleForm11",
          ];
          //@ts-ignore
          if (res.code === 200) {
            const list = res.data.resident;
            this.showName = list.name;
            this.showCardnumber = list.cardNumber;
            const dataList = res.data;
            forms.forEach((form) => {
              Object.keys(this[form]).forEach((key) => {
                if (list.hasOwnProperty(key)) {
                  this[form][key] = list[key];
                }
              });
            });
            // this.ruleForm.respDoctor = dataList.respDoctor;
            this.ruleForm2.populationCategoryList =
              dataList.populationCategoryList;
            // this.ruleForm.exaTime = dataList.exaTime;
            this.ruleForm3.height = dataList.height;
            this.ruleForm3.weight = dataList.weight;
            this.ruleForm3.waist = dataList.waist;
            this.ruleForm3.height1 = dataList.height;
            this.ruleForm3.weight1 = dataList.weight;
            this.ruleForm3.waist1 = dataList.waist;
            this.$refs.ruleFormRef.validate((valid) => {});

            //@ts-ignore
            if (res.message !== "成功") {
              this.$confirm(
                //@ts-ignore
                `${res.message}`,
                "提示",
                {
                  confirmButtonText: "确认",
                  // cancelButtonText: "取消",
                  type: "warning",
                }
              )
                .then(() => {
                  // this.resetForm();
                })
                .catch(() => {
                  // this.resetForm();
                });
            }
          }
        });
    },

    //姓名模糊查询
    queryNameAsync: debounce(function (queryString, cb) {
      let results = [];
      queryString = queryString.trim();
      if (!queryString || this.showName == queryString) {
        cb([]);
        return;
      }

      const find = {
        name: queryString,
      };

      http
        .post("/health/getResidentList", find)
        .then((res) => {
          if (res.data) {
            res.data.forEach((v) => {
              results.push({
                value: v.cardNumber + " " + v.name,
                cardNumber: v.cardNumber,
                name: v.name,
              });
            });
            cb(results);
          } else {
            // cb([]);
          }
        })
        .catch((error) => {
          console.error("Error fetching data:", error);
          cb([]);
        });
    }, 500),
    //回车跳转
    nextInput(key,index?) {
      if (this.$refs[key]&& typeof this.$refs[key].focus === "function") {
        this.$refs[key].focus();
      }
      if(key=='missing_teeth'&&this.ruleForm5.teethAlignmentList.includes('龋齿')){
        this.$refs.cavities_top_left.focus();
      }else if(key=='missing_teeth'&&this.ruleForm5.teethAlignmentList.includes('义齿(假牙)')){
        this.$refs.dentures_top_left.focus();
      }else{
        if(key=='missing_teeth'){
          this.$refs.leftEyeInput.focus();
        }
      }
      if(key=='cavities'&&this.ruleForm5.teethAlignmentList.includes('义齿(假牙)')){
        this.$refs.dentures_top_left.focus();
      }else{
        if(key=='cavities'){
          this.$refs.leftEyeInput.focus();
        }
      }
      if (
        key === "drugInput" &&
        this.drugValidateForm.medicationList.length > 0 &&
        !index
      ) {
        return this.$refs.drugInput[0].focus();
      }
    
      if (index >= 0) {
        if(this.$refs[key][index]){
          return this.$refs[key][index].focus();
        }
      }
    },
    //输入框质控
    setBoxShadow(refName, color) {
      if (this.$refs[refName]) {
        //@ts-ignore
        this.$refs[refName].$el.querySelector(
          ".el-input__wrapper"
        ).style.boxShadow = `0 0 0 1px ${color} inset`;
      }
    },
    updateSelfCareAssessment(val) {
      this.selfCareAssessmentVisible = false;
      const rangeMap = {
        "可自理（0-3分）": [0, 3],
        "轻度依赖（4-8分）": [4, 8],
        "中度依赖（9-18分）": [9, 18],
        "不能自理（≥19分）": [19, Infinity],
      };
      let radioValue;
      Object.keys(rangeMap).forEach((key) => {
        const [min, max] = rangeMap[key];
        if (
          val.elderlySelfCareScore >= min &&
          val.elderlySelfCareScore <= max
        ) {
          radioValue = key;
          return;
        }
      });
      // todo - 保存更新的分值
      this.ruleForm3.elderlySelfCareScore = radioValue;
      this.ruleForm3.elderlyScoreId = val.elderlyScoreId;
    },

    handleClick(e: MouseEvent) {
      e.preventDefault();
    },
    //视力切换
    visionChange() {
      this.ruleForm5.leftEye = "";
      this.ruleForm5.rightEye = "";
    },
    visionChange2() {
      this.ruleForm5.leftjzEye = "";
      this.ruleForm5.rightjzEye = "";
    },
    resetForm1() {
      this.$confirm("是否确定清空已填写内容", "提示", {
        confirmButtonText: "确认",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.resetForm();
        })
        .catch(() => {});
    },
    //清空
    resetForm() {
      // document.getElementById("part1").scrollIntoView();
      document.querySelector(".content_box").scrollTop = 0;
      this.$refs.ruleFormRef.resetFields();
      this.$refs.ruleFormRef2.resetFields();
      this.$refs.ruleFormRef3.resetFields();
      this.$refs.ruleFormRef4.resetFields();
      this.$refs.ruleFormRef5.resetFields();
      this.$refs.ruleFormRef6.resetFields();
      this.$refs.ruleFormRef7.resetFields();
      this.$refs.ruleFormRef8.resetFields();
      this.$refs.ruleFormRef9.resetFields();
      this.$refs.drugValidateFormRef.resetFields();
      this.$refs.ruleFormRef10.resetFields();
      this.$refs.ruleFormRef11.resetFields();
      this.ruleForm.exaTime = this.getCurrentDate(); // 设置默认体检日期
      this.ruleForm11.nextYearExaTime = this.getNextYearDate(); //设置年检日期
      this.drugValidateForm.medicationList = [];
      this.ruleForm4.dietPartTwo = [];
      this.ruleForm4.otherProtectionOther = "";
      this.ruleForm5.missingTeethList = [];
      this.ruleForm5.cavitiesList = [];
      this.ruleForm5.denturesList = [];
      this.ruleForm5.visionList = [];
      this.ruleForm5.missing_teeth_top_left = "";
      this.ruleForm5.missing_teeth_bottom_left = "";
      this.ruleForm5.missing_teeth_top_right = "";
      this.ruleForm5.missing_teeth_bottom_right = "";
      this.ruleForm5.cavities_top_left = "";
      this.ruleForm5.cavities_bottom_left = "";
      this.ruleForm5.cavities_top_right = "";
      this.ruleForm5.cavities_bottom_right = "";
      this.ruleForm5.dentures_top_left = "";
      this.ruleForm5.dentures_bottom_left = "";
      this.ruleForm5.dentures_top_right = "";
      this.ruleForm5.dentures_bottom_right = "";
      this.ruleForm5.vision = "裸眼视力";
      this.ruleForm5.leftEye = "";
      this.ruleForm5.rightEye = "";
      this.ruleForm5.leftjzEye = "";
      this.ruleForm5.rightjzEye = "";
      (this.ruleForm3.heightShow = false),
        (this.ruleForm3.heightmsg = ""),
        (this.ruleForm3.weightShow = false),
        (this.ruleForm3.weightmsg = ""),
        (this.ruleForm3.waistShow = false),
        (this.ruleForm3.waistmsg = ""),
        this.setBoxShadow("heightInput", "#ccc");
      this.setBoxShadow("weightInput", "#ccc");
      this.setBoxShadow("waistInput", "#ccc");
      this.setBoxShadow("temperatureInput", "#ccc");
      this.setBoxShadow("pulseInput", "#ccc");
      this.setBoxShadow("breathingRateInput", "#ccc");
      this.setBoxShadow("leftDiastolicInput", "#ccc");
      this.setBoxShadow("rightDiastolicInput", "#ccc");
      this.setBoxShadow("leftSystolicInput", "#ccc");
      this.setBoxShadow("rightSystolicInput", "#ccc");
      this.setBoxShadow("randomGlucoseInput", "#ccc");
      this.setBoxShadow("weeklySportsInput", "#ccc");
      this.setBoxShadow("weeklySportsTimeInput", "#ccc");
      this.setBoxShadow("habitTimeInput", "#ccc");
      this.setBoxShadow("dailySmokeInput", "#ccc");
      this.setBoxShadow("startSmokeInput", "#ccc");
      this.setBoxShadow("quitSmokeInput", "#ccc");
      this.setBoxShadow("dailyDrinkInput", "#ccc");
      this.setBoxShadow("startDrinkInput", "#ccc");
      this.setBoxShadow("quitDrinkInput", "#ccc");
      this.setBoxShadow("yearsOfServiceInput", "#ccc");
      this.setBoxShadow("leftEyeInput", "#ccc");
      this.setBoxShadow("rightEyeInput", "#ccc");
      this.setBoxShadow("leftjzEyeInput", "#ccc");
      this.setBoxShadow("rightjzEyeInput", "#ccc");
      this.showName = "";
      this.showCardnumber = "";
    },

    //提交
    submit() {
      this.$refs.ruleFormRef.validate((valid) => {
        if (valid) {
          this.$refs.ruleFormRef2.validate((valid) => {
            if (valid) {
              this.$refs.ruleFormRef3.validate((valid) => {
                if (valid) {
                  this.$refs.ruleFormRef4.validate((valid) => {
                    if (valid) {
                      this.$refs.ruleFormRef5.validate((valid) => {
                        if (valid) {
                          this.$refs.ruleFormRef6.validate((valid) => {
                            if (valid) {
                              this.$refs.ruleFormRef7.validate((valid) => {
                                if (valid) {
                                  this.$refs.ruleFormRef8.validate((valid) => {
                                    if (valid) {
                                      this.$refs.ruleFormRef9.validate(
                                        (valid) => {
                                          if (valid) {
                                            this.$refs.drugValidateFormRef.validate(
                                              (valid) => {
                                                if (valid) {
                                                  this.$refs.ruleFormRef10.validate(
                                                    (valid) => {
                                                      if (valid) {
                                                        this.$refs.ruleFormRef11.validate(
                                                          (valid) => {
                                                            if (valid) {
                                                              //处理视力
                                                              if (
                                                                this.ruleForm5
                                                                  .vision ==
                                                                "裸眼视力"
                                                              ) {
                                                                this.ruleForm5.visionList =
                                                                  [
                                                                    this
                                                                      .ruleForm5
                                                                      .leftEye,
                                                                    this
                                                                      .ruleForm5
                                                                      .rightEye,
                                                                  ];
                                                              } else if (
                                                                this.ruleForm5
                                                                  .vision ==
                                                                "矫正视力"
                                                              ) {
                                                                this.ruleForm5.visionList =
                                                                  [
                                                                    this
                                                                      .ruleForm5
                                                                      .leftjzEye,
                                                                    this
                                                                      .ruleForm5
                                                                      .rightjzEye,
                                                                  ];
                                                              }
                                                              //缺齿处理
                                                              let missingTeethList =
                                                                [];
                                                              missingTeethList.push(
                                                                this.ruleForm5
                                                                  .missing_teeth_top_left
                                                              );
                                                              missingTeethList.push(
                                                                this.ruleForm5
                                                                  .missing_teeth_bottom_left
                                                              );
                                                              missingTeethList.push(
                                                                this.ruleForm5
                                                                  .missing_teeth_top_right
                                                              );
                                                              missingTeethList.push(
                                                                this.ruleForm5
                                                                  .missing_teeth_bottom_right
                                                              );
                                                              this.ruleForm5.missingTeethList =
                                                                missingTeethList;
                                                              //义齿处理
                                                              let denturesList =
                                                                [];
                                                              denturesList.push(
                                                                this.ruleForm5
                                                                  .dentures_top_left
                                                              );
                                                              denturesList.push(
                                                                this.ruleForm5
                                                                  .dentures_bottom_left
                                                              );
                                                              denturesList.push(
                                                                this.ruleForm5
                                                                  .dentures_top_right
                                                              );
                                                              denturesList.push(
                                                                this.ruleForm5
                                                                  .dentures_bottom_right
                                                              );
                                                              this.ruleForm5.denturesList =
                                                                denturesList;
                                                              //龋齿处理
                                                              let cavitiesList =
                                                                [];
                                                              cavitiesList.push(
                                                                this.ruleForm5
                                                                  .cavities_top_left
                                                              );
                                                              cavitiesList.push(
                                                                this.ruleForm5
                                                                  .cavities_bottom_left
                                                              );
                                                              cavitiesList.push(
                                                                this.ruleForm5
                                                                  .cavities_top_right
                                                              );
                                                              cavitiesList.push(
                                                                this.ruleForm5
                                                                  .cavities_bottom_right
                                                              );
                                                              this.ruleForm5.cavitiesList =
                                                                cavitiesList;
                                                              let data = {
                                                                ...this
                                                                  .ruleForm,
                                                                ...this
                                                                  .ruleForm2,
                                                                ...this
                                                                  .ruleForm3,
                                                                ...this
                                                                  .ruleForm4,
                                                                ...this
                                                                  .ruleForm5,
                                                                ...this
                                                                  .ruleForm6,
                                                                ...this
                                                                  .ruleForm7,
                                                                ...this
                                                                  .ruleForm8,
                                                                ...this
                                                                  .ruleForm9,
                                                                ...this
                                                                  .drugValidateForm,
                                                                ...this
                                                                  .ruleForm10,
                                                                ...this
                                                                  .ruleForm11,
                                                              };
                                                              //删除无用数据
                                                              delete data.missing_teeth_top_left;
                                                              delete data.missing_teeth_bottom_left;
                                                              delete data.missing_teeth_top_right;
                                                              delete data.missing_teeth_bottom_right;
                                                              delete data.dentures_top_left;
                                                              delete data.dentures_bottom_left;
                                                              delete data.dentures_top_right;
                                                              delete data.dentures_bottom_right;
                                                              delete data.cavities_top_left;
                                                              delete data.cavities_bottom_left;
                                                              delete data.cavities_top_right;
                                                              delete data.cavities_bottom_right;
                                                              delete data.age;
                                                              delete data.heightShow;
                                                              delete data.heightmsg;
                                                              delete data.weightShow;
                                                              delete data.weightmsg;
                                                              delete data.waistShow;
                                                              delete data.waistmsg;
                                                              delete data.height1;
                                                              delete data.weight1;
                                                              delete data.waist1;
                                                              this.$confirm(
                                                                `请确定是否录入全部信息`,
                                                                "提示",
                                                                {
                                                                  confirmButtonText:
                                                                    "确认",
                                                                  cancelButtonText:
                                                                    "取消",
                                                                  type: "warning",
                                                                }
                                                              )
                                                                .then(() => {
                                                                  http
                                                                    .post(
                                                                      "/health/saveOrUpdateHealth",
                                                                      data
                                                                    )
                                                                    .then(
                                                                      (res) => {
                                                                        if (
                                                                          //@ts-ignore
                                                                          res.code ===
                                                                          200
                                                                        ) {
                                                                          ElMessage.success(
                                                                            "保存成功"
                                                                          );
                                                                          this.resetForm();
                                                                          document
                                                                            .getElementById(
                                                                              "part1"
                                                                            )
                                                                            .scrollIntoView();
                                                                        }
                                                                      }
                                                                    );
                                                                })
                                                                .catch(() => {
                                                                  return;
                                                                });
                                                            } else {
                                                              document
                                                                .getElementById(
                                                                  "part12"
                                                                )
                                                                .scrollIntoView();
                                                            }
                                                          }
                                                        );
                                                      } else {
                                                        document
                                                          .getElementById(
                                                            "part11"
                                                          )
                                                          .scrollIntoView();
                                                      }
                                                    }
                                                  );
                                                } else {
                                                  document
                                                    .getElementById("part10")
                                                    .scrollIntoView();
                                                }
                                              }
                                            );
                                          } else {
                                            document
                                              .getElementById("part9")
                                              .scrollIntoView();
                                          }
                                        }
                                      );
                                    } else {
                                      document
                                        .getElementById("part8")
                                        .scrollIntoView();
                                    }
                                  });
                                } else {
                                  document
                                    .getElementById("part7")
                                    .scrollIntoView();
                                }
                              });
                            } else {
                              document.getElementById("part6").scrollIntoView();
                            }
                          });
                        } else {
                          document.getElementById("part5").scrollIntoView();
                        }
                      });
                    } else {
                      document.getElementById("part4").scrollIntoView();
                    }
                  });
                } else {
                  document.getElementById("part3").scrollIntoView();
                }
              });
            } else {
              document.getElementById("part2").scrollIntoView();
            }
          });
        } else {
          // document.getElementById("part1").scrollIntoView();
          document.querySelector(".content_box").scrollTop = 0;

        }
      });
    },
    //用药显示
    getShow() {
      this.tipshow = false;
    },
    parseDate(value) {
      if (/^\d{8}$/.test(value)) {
        // 如果是 yyyymmdd 格式
        const year = value.slice(0, 4);
        const month = value.slice(4, 6) - 1; // JavaScript中的月份是从0开始的
        const day = value.slice(6, 8);
        return new Date(year, month, day);
      } else if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
        // 如果是 yyyy-mm-dd 格式
        return new Date(value);
      }
      return NaN;
    },
    //处理时间日期
    getNextYearDate() {
      const date = new Date();
      const nextYear = date.getFullYear() + 1;
      const month = String(date.getMonth() + 1).padStart(2, "0");
      const day = String(date.getDate()).padStart(2, "0");
      return `${nextYear}-${month}-${day}`;
    },
    getCurrentDate() {
      const date = new Date();
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, "0");
      const day = String(date.getDate()).padStart(2, "0");
      return `${year}-${month}-${day}`;
    },
    //症状互斥
    handleCheckboxChange(val) {
      if (val.includes("无症状") && val.length > 1) {
        this.ruleForm2.symptomList = ["无症状"];
      }
    },
    handleCheckboxChange1() {
      this.ruleForm2.symptomList = this.ruleForm2.symptomList.filter(
        (item) => item !== "无症状"
      );
    },
    //咽部互斥
    changePharynx() {
      if (this.ruleForm5.throatList.includes("无充血")) {
        this.ruleForm5.throatList = this.ruleForm5.throatList.filter(
          (item) => item === "无充血"
        );
      }
    },
    changePharynx2() {
      if (this.ruleForm5.throatList.includes("无充血")) {
        this.ruleForm5.throatList = this.ruleForm5.throatList.filter(
          (item) => item !== "无充血"
        );
      }
    },
    //齿列互斥
    changeDentalHealth(val) {
      this.ruleForm5.teethAlignmentList = ["正常"];
    },
    changeDentalHealth2() {
      this.ruleForm5.teethAlignmentList =
        this.ruleForm5.teethAlignmentList.filter((item) => item !== "正常");
    },
    //脑血管疾病互斥
    changeCereb() {
      if (this.ruleForm6.cerebrovascularDiseaseList.includes("无")) {
        this.ruleForm6.cerebrovascularDiseaseList = ["无"];
      }
    },
    changeCereb1() {
      this.ruleForm6.cerebrovascularDiseaseList =
        this.ruleForm6.cerebrovascularDiseaseList.filter(
          (item) => item !== "无"
        );
    },
    //肾脏疾病互斥
    changeRenal() {
      if (this.ruleForm6.kidneyDiseaseList.includes("无")) {
        this.ruleForm6.kidneyDiseaseList = ["无"];
      }
    },
    changeRenal1() {
      this.ruleForm6.kidneyDiseaseList =
        this.ruleForm6.kidneyDiseaseList.filter((item) => item !== "无");
    },
    //心脏疾病互斥
    changeCardiac() {
      if (this.ruleForm6.heartDiseaseList.includes("无")) {
        this.ruleForm6.heartDiseaseList = ["无"];
      }
    },
    changeCardiac1() {
      this.ruleForm6.heartDiseaseList = this.ruleForm6.heartDiseaseList.filter(
        (item) => item !== "无"
      );
    },
    //血管疾病互斥
    changeVascular() {
      if (this.ruleForm6.vascularDiseaseList.includes("无")) {
        this.ruleForm6.vascularDiseaseList = ["无"];
      }
    },
    changeVascular1() {
      this.ruleForm6.vascularDiseaseList =
        this.ruleForm6.vascularDiseaseList.filter((item) => item !== "无");
    },
    //眼部疾病互斥
    changeEye() {
      if (this.ruleForm6.eyeDiseaseList.includes("无")) {
        this.ruleForm6.eyeDiseaseList = ["无"];
      }
    },
    changeEye1() {
      this.ruleForm6.eyeDiseaseList = this.ruleForm6.eyeDiseaseList.filter(
        (item) => item !== "无"
      );
    },
    //淋巴结互斥
    changelymp() {
      this.ruleForm9.lymphNodesList = ["未触及"];
    },
    changelymp2() {
      this.ruleForm9.lymphNodesList = this.ruleForm9.lymphNodesList.filter(
        (item) => item !== "未触及"
      );
    },
    //肺部呼吸音互斥
    changeLung() {
      this.ruleForm9.ralesList = ["无"];
    },
    changeLung2() {
      this.ruleForm9.ralesList = this.ruleForm9.ralesList.filter(
        (item) => item !== "无"
      );
    },
    //足背动脉搏互斥
    changeHeart() {
      if (this.ruleForm9.dorsalPulsePartList.includes("未触及")) {
        this.ruleForm9.dorsalPulsePartList = ["未触及"];
      }
    },
    changeHeart2() {
      if (this.ruleForm9.dorsalPulsePartList.includes("触及双侧对称")) {
        this.ruleForm9.dorsalPulsePartList = ["触及双侧对称"];
      }
    },
    changeHeart3() {
      if (
        this.ruleForm9.dorsalPulsePartList.includes("触及左侧减弱或消失") ||
        this.ruleForm9.dorsalPulsePartList.includes("触及右侧减弱或消失")
      ) {
        this.ruleForm9.dorsalPulsePartList =
          this.ruleForm9.dorsalPulsePartList.filter(
            (item) =>
              item == "触及左侧减弱或消失" || item == "触及右侧减弱或消失"
          );
      }
    },
    //健康指导互斥
    headlthChange() {
      if (this.ruleForm11.healthGuidanceList.includes("建议复查")) {
        this.ruleForm11.healthGuidanceList =
          this.ruleForm11.healthGuidanceList.filter(
            (item) => item !== "建议转诊"
          );
      }
    },
    headlthChange2() {
      if (this.ruleForm11.healthGuidanceList.includes("建议转诊")) {
        this.ruleForm11.healthGuidanceList =
          this.ruleForm11.healthGuidanceList.filter(
            (item) => item !== "建议复查"
          );
      }
    },
    //拒检项目互斥
    rejectedChange() {
      this.ruleForm11.refusedTestsList = ["无"];
    },
    rejectedChange2() {
      if (this.ruleForm11.refusedTestsList.includes("无")) {
        this.ruleForm11.refusedTestsList =
          this.ruleForm11.refusedTestsList.filter((item) => item !== "无");
      }
    },

    //添加住院史
    addHosp() {
      if (this.ruleForm7.hospitalHistoryList.length < 10) {
        this.ruleForm7.hospitalHistoryList.push({
          hospitalization_name: "",
          hospitalization_time: "",
          hospitalization_disease: "",
          hospitalization_disease_detail: "",
          hospitalization_disease_detail_other: "",
          hospitalization_disease_detail_other_detail: "",
        });
      }
    },
    //删除住院史
    moveHosp(item) {
      const index = this.ruleForm7.hospitalHistoryList.indexOf(item);
      if (index !== -1) {
        this.ruleForm7.hospitalHistoryList.splice(index, 1);
      }
    },
    changeHospital() {
      if (this.ruleForm7.hospitalHistoryList.length == 0) {
        this.addHosp();
      }
    },
    changeHospital2() {
      this.ruleForm7.hospitalHistoryList = [];
    },
    //添加家庭病床史
    addHome() {
      if (this.ruleForm7.familyBedHistoryList.length < 10) {
        this.ruleForm7.familyBedHistoryList.push({
          medicalInstitutionName: "",
          //   医疗机构名称
          reason: "",
          //  入院原因
          bedEstablishedDate: "",
          // 建床日期
          bedRemovedDate: "",
          // 撤床日期
          medicalRecordNumber: "",
          //   病案号
        });
      }
    },
    //删除家庭病床史
    moveHome(item) {
      const index = this.ruleForm7.familyBedHistoryList.indexOf(item);
      if (index !== -1) {
        this.ruleForm7.familyBedHistoryList.splice(index, 1);
      }
    },
    changeHome() {
      if (this.ruleForm7.familyBedHistoryList.length == 0) {
        this.addHome();
      }
    },
    changeHome2() {
      this.ruleForm7.familyBedHistoryList = [];
    },
    //添加接种史
    addVacc() {
      if (this.ruleForm8.nonVaccineHistoryList.length < 10) {
        this.ruleForm8.nonVaccineHistoryList.push({
          vaccineName: "",

          vaccinationDate: "",

          vaccinationSite: "",
        });
      }
    },
    //删除接种史
    moveVacc(item) {
      const index = this.ruleForm8.nonVaccineHistoryList.indexOf(item);
      if (index !== -1) {
        this.ruleForm8.nonVaccineHistoryList.splice(index, 1);
      }
    },
    changeVacc() {
      if (this.ruleForm8.nonVaccineHistoryList.length == 0) {
        this.addVacc();
      }
    },
    changeVacc2() {
      this.ruleForm8.nonVaccineHistoryList = [];
    },
    //添加药品
    addDrug() {
      if (this.drugValidateForm.medicationList.length < 50) {
        this.drugValidateForm.medicationList.push({
          medicationName: "",
          //  药品名称
          medicationTime: "",
          //  用药时间
          medicationType:"外院",
          //  用药类型
          frequencyDay: "",
          // 天 频次
          frequencyCount: "",
          //  频次
          dosagePerDay: "",
          //  剂量
          dosagePerCount: "",
          //  剂量单位
        });
      }
    },
    //移除药品
    moveDrug(item) {
      const index = this.drugValidateForm.medicationList.indexOf(item);
      if (index !== -1) {
        this.drugValidateForm.medicationList.splice(index, 1);
      }
    },
    //添加体检评价
    addHealth() {
      if (this.ruleForm10.examAbnormalitiesList.length < 20) {
        this.ruleForm10.examAbnormalitiesListStatus = "有";
        this.ruleForm10.examAbnormalitiesList.push({
          abnormalSituation: "",
        });
      }
    },
    //删除体检评价
    moveHealth(item) {
      const index = this.ruleForm10.examAbnormalitiesList.indexOf(item);
      if (index !== -1) {
        this.ruleForm10.examAbnormalitiesList.splice(index, 1);
        if (this.ruleForm10.examAbnormalitiesList.length == 0) {
          this.ruleForm10.examAbnormalitiesListStatus = "无";
        }
      }
    },
    changeHealth() {
      if (this.ruleForm10.examAbnormalitiesList.length == 0) {
        this.addHealth();
      }
    },
    changeHealth2() {
      this.ruleForm10.examAbnormalitiesList = [];
    },
    //入院日期规则
    validateAdmissionDate(rule, value, callback) {
      const dateFormat = /^(?:\d{4}-\d{2}-\d{2}|\d{8})$/;
      const currentDate = new Date();
      const oneYearAgo = new Date();
      oneYearAgo.setFullYear(currentDate.getFullYear() - 1);
      if (!value) {
        callback();
      } else {
        if (!dateFormat.test(value)) {
          callback(new Error("请输入 2020-01-01 或 20200101 格式日期"));
        } else {
          const date = this.parseDate(value);
          this.timeDate = date;
          if (isNaN(date)) {
            callback(new Error("请输入正确的日期"));
          } else if (date > currentDate) {
            callback(new Error("请输入正确的入院日期"));
          } else if (date < oneYearAgo) {
            callback(new Error("请输入正确的入院日期"));
          } else {
            callback();
          }
        }
      }
    },
    //  出院日期规则
    validateOutDate(rule, value, callback) {
      const dateFormat = /^(?:\d{4}-\d{2}-\d{2}|\d{8})$/;
      const currentDate = new Date();
      const oneYearAgo = new Date();
      oneYearAgo.setFullYear(currentDate.getFullYear() - 1);
      if (!value) {
        callback();
      } else {
        if (!dateFormat.test(value)) {
          callback(new Error("请输入 2020-01-01 或 20200101 格式日期"));
        } else {
          const date = this.parseDate(value);
          if (isNaN(date)) {
            callback(new Error("请输入正确的日期"));
          } else if (date < this.timeDate) {
            callback(new Error("请输入正确的出院日期"));
          } else if (date < oneYearAgo) {
            callback(new Error("请输入正确的出院日期"));
          } else {
            callback();
          }
        }
      }
    },
    //接种日期规则
    validateJzDate(rule, value, callback) {
      const dateFormat = /^(?:\d{4}-\d{2}-\d{2}|\d{8})$/;
      const currentDate = new Date();
      const oneYearAgo = new Date();
      oneYearAgo.setFullYear(currentDate.getFullYear() - 1);
      if (!value) {
        callback();
      } else {
        if (!dateFormat.test(value)) {
          callback(new Error("请输入 2020-01-01 或 20200101 格式日期"));
        } else {
          const date = this.parseDate(value);
          this.timeDate = date;
          if (isNaN(date)) {
            callback(new Error("请输入正确的日期"));
          } else if (date > currentDate) {
            callback(new Error("接种日期不能晚于当前日期"));
          } else {
            callback();
          }
        }
      }
    },
  },
  computed: {
    pickerOptions() {
      return {
        disabledDate: (time) => {
          const today = new Date();
          return time.getTime() > today.getTime();
        },
      };
    },
    getruleForm() {
      const { birthday, exaTime } = this.ruleForm;
      return { birthday, exaTime };
    },
    getruleForm2() {
      const { populationCategoryList, symptomList } = this.ruleForm2;
      return { populationCategoryList, symptomList };
    },
    getruleForm4() {
      const { weeklyExercises, smoking, drinkingFrequency,jobHazards,drinkTypeList} = this.ruleForm4;
      return { weeklyExercises, smoking, drinkingFrequency,jobHazards,drinkTypeList};
    },
    getruleForm5() {
      const {
        vision,
        missingTeethList,
        teethAlignmentList,
        cavitiesList,
        denturesList,
        hearing,
        leftEye,
        rightEye,
        leftjzEye,
        rightjzEye,
      } = this.ruleForm5;
      return {
        vision,
        missingTeethList,
        teethAlignmentList,
        cavitiesList,
        denturesList,
        hearing,
        leftEye,
        rightEye,
        leftjzEye,
        rightjzEye,
      };
    },
    getruleForm6() {
      const {
        cerebrovascularDiseaseList,
        kidneyDiseaseList,
        heartDiseaseList,
        vascularDiseaseList,
        eyeDiseaseList,
        nervousSystemDisease,
        otherSystemDisease
       
      } = this.ruleForm6;
      return {
        cerebrovascularDiseaseList,
        kidneyDiseaseList,
        heartDiseaseList,
        vascularDiseaseList,
        eyeDiseaseList,
        nervousSystemDisease,
        otherSystemDisease
      };
    },
    getruleForm3() {
      const {
        height,
        weight,
        waist,
        height1,
        weight1,
        waist1,
        leftSystolic,
        leftDiastolic,
        rightSystolic,
        rightDiastolic,
        randomGlucose,
        fastingBloodGlucose,
        elderlySelfCareScore,
        pulse,
      } = this.ruleForm3;
      return {
        height,
        weight,
        waist,
        height1,
        weight1,
        waist1,
        leftSystolic,
        leftDiastolic,
        rightSystolic,
        rightDiastolic,
        randomGlucose,
        fastingBloodGlucose,
        elderlySelfCareScore,
        pulse,
      };
    },
    getruleForm9() {
      const {
        skin,
        sclera,
        lymphNodesList,
        barrelChest,
        breathSounds,
        ralesList,
        heartRhythm,
        heartRate,
        heartMurmur,
        abdominalMass,
        legEdema,
        abdominalTenderness,
        dorsalPulsePartList,
        shiftingDullness,
        hepatomegaly,
        splenomegaly,
      } = this.ruleForm9;
      return {
        skin,
        sclera,
        lymphNodesList,
        barrelChest,
        breathSounds,
        ralesList,
        heartRhythm,
        heartRate,
        heartMurmur,
        abdominalMass,
        legEdema,
        dorsalPulsePartList,
        shiftingDullness,
        abdominalTenderness,
        hepatomegaly,
        splenomegaly,
      };
    },
    getruleForm10() {
      const { examAbnormalitiesList, examAbnormalitiesListStatus } =
        this.ruleForm10;
      return { examAbnormalitiesList, examAbnormalitiesListStatus };
    },
    getruleForm11() {
      const { healthGuidanceList } = this.ruleForm11;
      return { healthGuidanceList };
    },
  },
  watch: {
    dialogObj: {
      handler(newVal, oldVal) {
        this.ruleForm = newVal.DialogDate;
      },
      deep: true, // 深度监听，确保对象内部属性的变化也能被监听到
    },
    getruleForm(val) {
      const { birthday, exaTime } = val;
      const i = this.ruleForm.birthday?.split("-")[0];
      if (i) {
        //@ts-ignore
        this.ruleForm.age = new Date().getFullYear() + "" - i;
        if (this.ruleForm.age >= 65) {
          const index = this.ruleForm2.populationCategoryList.indexOf("老年人");
          if(index === -1){
            this.ruleForm2.populationCategoryList.push("老年人");
            this.ruleForm11.riskControlList.push("预防跌倒");
            this.ruleForm11.riskControlList.push("预防骨质疏松");
            this.ruleForm11.riskControlList.push("流感疫苗接种");
            this.ruleForm11.riskControlList.push("肺炎疫苗接种");
          }
         
        }
      }
      if (exaTime) {
        const exaDate = new Date(exaTime); // 将 exaTime 转换为 Date 对象
        exaDate.setFullYear(exaDate.getFullYear() + 1); // 将年份增加1
        this.ruleForm11.nextYearExaTime = exaDate.toISOString().split("T")[0]; // 格式化为 YYYY-MM-DD 字符串
      }
    },
    getruleForm2(val) {
      const bmiList = [
        { abnormalSituation: "体重过低，BMI＜18.5" },
        { abnormalSituation: "超重，28＞BMI≥24" },
        { abnormalSituation: "肥胖，BMI≥28" },
        { abnormalSituation: `腹型肥胖，腰围CM` },
        { abnormalSituation: `糖尿病，血糖控制不满意` },
        { abnormalSituation: `血糖升高，建议复查` },
        { abnormalSituation: `糖调节受损或糖尿病前期` },
      ];
      const { populationCategoryList, symptomList } = val;
      if (populationCategoryList?.includes("其他")) {
        this.ruleForm2.crowdInput = true;
      } else {
        this.ruleForm2.crowdInput = false;
       this.ruleForm2.populationCategoryOther = "";
      }
      if (
        populationCategoryList?.includes("高血压") &&
        populationCategoryList?.includes("糖尿病")
      ) {
        this.ruleForm6.otherSystemDisease = "有";
        this.ruleForm6.otherSystemDiseaseOther = "高血压、2型糖尿病";
        //健康指导
        const index = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item === "纳入慢性病患者健康管理"
        );
        if (index == -1) {
          this.ruleForm11.healthGuidanceList.push("纳入慢性病患者健康管理");
        }
        const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[5].abnormalSituation
        );
        if (index1 !== -1) {
          this.ruleForm10.examAbnormalitiesList.splice(index1, 1);
          this.ruleForm10.examAbnormalitiesList.push(bmiList[4]);
        }
      } else if (populationCategoryList.includes("高血压")) {
        this.ruleForm6.otherSystemDisease = "有";
        this.ruleForm6.otherSystemDiseaseOther = "高血压";
        const index = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item === "纳入慢性病患者健康管理"
        );
        if (index == -1) {
          this.ruleForm11.healthGuidanceList.push("纳入慢性病患者健康管理");
        }
        const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[4].abnormalSituation
        );
        if (index1 !== -1) {
          this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          this.ruleForm10.examAbnormalitiesList.push(bmiList[5]);
        }
      } else if (populationCategoryList?.includes("糖尿病")) {
        this.ruleForm6.otherSystemDisease = "有";
        this.ruleForm6.otherSystemDiseaseOther = "2型糖尿病";
        const index = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item === "纳入慢性病患者健康管理"
        );
        if (index == -1) {
          this.ruleForm11.healthGuidanceList.push("纳入慢性病患者健康管理");
        }
        if (this.ruleForm3.randomGlucose >= 10||this.ruleForm3.fastingBloodGlucose >= 7) {
          const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[4].abnormalSituation
          );
          if (index1 == -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[4]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[4].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[5].abnormalSituation
        );
        const index2 = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[4].abnormalSituation
        );
        if(index1 !== -1&&index2 !== -1){
          this.ruleForm10.examAbnormalitiesList.splice(index1, 1);
        }
      } else {
        this.ruleForm6.otherSystemDisease = "无";
        this.ruleForm6.otherSystemDiseaseOther = "";
        const idnex1 = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item === "纳入慢性病患者健康管理"
        );

        if (idnex1 !== -1) {
          this.ruleForm11.healthGuidanceList.splice(idnex1, 1);
        }
      }

      if (symptomList.includes("其他")) {
        this.ruleForm2.symptomInput = true;
      } else {
        this.ruleForm2.symptomInput = false;
        this.ruleForm2.symptomOther = "";
      }

      if (!populationCategoryList?.includes("糖尿病")) {
        const index = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[4].abnormalSituation
        );
        if (index !== -1) {
          this.ruleForm10.examAbnormalitiesList.splice(index, 1);
        }
      }
      if (this.ruleForm3.randomGlucose >= 11.1||this.ruleForm3.fastingBloodGlucose >= 7.0) {
        const tnbIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[5].abnormalSituation
        );
        const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[4].abnormalSituation
        );
        if (tnbIndex === -1 && index1 === -1) {
          this.ruleForm10.examAbnormalitiesList.push(
            bmiList[5].abnormalSituation
          );
        }
      } else {
        const index = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[5].abnormalSituation
        );
        const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
          (item) => item.abnormalSituation === bmiList[4].abnormalSituation
        );
        if (index !== -1) {
          this.ruleForm10.examAbnormalitiesList.splice(index, 1);
        }
      }
     
    },

    getruleForm3: {
      handler: debounce(function (newValue) {
        const {
          height,
          weight,
          waist,
          height1,
          weight1,
          waist1,
          leftSystolic,
          leftDiastolic,
          rightSystolic,
          rightDiastolic,
          randomGlucose,
          fastingBloodGlucose,
          elderlySelfCareScore,
          pulse,
        } = newValue;
        let bmi = 0;
        const bmiList = [
          { abnormalSituation: "体重过低，BMI＜18.5" },
          { abnormalSituation: "超重，28＞BMI≥24" },
          { abnormalSituation: "肥胖，BMI≥28" },
          { abnormalSituation: `腹型肥胖，腰围：${waist}CM` },
          { abnormalSituation: `糖尿病，血糖控制不满意` },
          { abnormalSituation: `血糖升高，建议复查` },
          { abnormalSituation: `高血压，血压控制不满意` },
          { abnormalSituation: `血压升高，建议复查` },
          { abnormalSituation: `生活自理能力异常：轻度依赖` },
          { abnormalSituation: `生活自理能力异常：中度依赖` },
          { abnormalSituation: `生活自理能力异常：不能自理` },
          { abnormalSituation: `糖调节受损或糖尿病前期` },
        
        ];
        let leftDifference = null;
        let rightDifference = null;
        if (leftSystolic && leftDiastolic && rightSystolic && rightDiastolic) {
          leftDifference = Math.abs(leftSystolic - rightSystolic);
          rightDifference = Math.abs(leftDiastolic - rightDiastolic);
        }

        let heightCM = Math.abs(height - height1).toFixed(1);
        let weightKG = Math.abs(weight - weight1).toFixed(1);
        let waistCM = Math.abs(waist - waist1).toFixed(1);
        // heightShow: false,
        // heightmsg: "",
        // weightShow: false,
        // weightmsg: "",
        // waistShow: false,
        // waistmsg: "",
        if (height && height1 && height != height1) {
          this.ruleForm3.heightShow = true;
          this.ruleForm3.heightmsg = `上次身高为${height1}，本次身高为${height}，差距为${heightCM}cm`;
        }else{
          this.ruleForm3.heightShow = false;
          console.log('heightCM',height,height1);
        }
        console.log(height,height1);
        
        if (weight && weight1 && weight != weight1) {
          this.ruleForm3.weightShow = true;
          this.ruleForm3.weightmsg = `上次体重为${weight1}，本次体重为${weight}，差距为${weightKG}kg`;
        }else{
          this.ruleForm3.weightShow = false;
        }
        if (waist && waist1 && waist != waist1) {
          this.ruleForm3.waistShow = true;
          this.ruleForm3.waistmsg = `上次腰围为${waist1}，本次腰围为${waist}，差距为${waistCM}cm`;
        }else{
          this.ruleForm3.waistShow = false;
        }
        //Bmi异常情况
        if (height && weight) {
          //@ts-ignore
          bmi = ((weight / (height * height)) * 10000).toFixed(2);
          if (bmi) {
            bmi = bmi;
          }
        }
        if (bmi < 18.5 && bmi !== 0) {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("体重过低")
          );

          if (index === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[0]);
          }
          let height1 = (height / 100).toFixed(2);
          //@ts-ignore
          let addwdith = 18.5 * height1 * height1;
          this.addWidth = ` 增体重(目标${addwdith.toFixed(1)}KG) `;
          if(!this.ruleForm11.riskControlList.includes("其他")){
            this.ruleForm11.riskControlList.push("其他");
          }
          const index1 =this.ruleForm11.riskControlOther.includes(`${this.addWidth}`)
          if(!index1){
            this.ruleForm11.riskControlOther += this.addWidth;
          }
        
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("体重过低")
          );

          this.addWidth = `增体重(目标  KG)`;
          this.ruleForm11.riskControlList =
            this.ruleForm11.riskControlList.filter((item) => item !== "其他");
          this.ruleForm11.riskControlOther = this.ruleForm11.riskControlOther.replace('增体重(目标  KG)','');
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        if (bmi >= 24 && bmi < 28) {
          const indexOf = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("超重")
          );
          if (indexOf === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[1]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[1].abnormalSituation
          );

          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        if (bmi >= 28) {
          const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("肥胖")
          );
          if (index1 === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[2]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[2].abnormalSituation
          );

          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        if (bmi >= 24) {
          let width = 0.95 * weight;
          this.moveWidth = `减体重(目标    ${width.toFixed(1)}   KG)`;
          const index1 = this.ruleForm11.riskControlList.findIndex((item) =>
            item.includes(this.moveWidth)
          );
          if(index1 == -1){
            this.ruleForm11.riskControlList.push(this.moveWidth);
          }
          
        } else {
          this.moveWidth = `减体重(目标      KG)`;
          const index1 = this.ruleForm11.riskControlList.findIndex((item) =>
            item.includes("减体重")
          );
          if (index1 !== -1) {
            this.ruleForm11.riskControlList.splice(index1, 1);
          }
        }

        //腰围
        if (waist >= 90 && this.ruleForm.gender === "男") {
          const waisIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("腹型肥胖")
          );
          if (waisIndex === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[3]);
          }
          let waistScore = waist * 0.98;
          this.moveWaist = `减腰围(目标   ${waistScore.toFixed(1)}     CM)`;
          const index1 = this.ruleForm11.riskControlList.findIndex((item) =>
            item.includes(this.moveWaist)
          );
          if(index1 === -1){
            this.ruleForm11.riskControlList.push(this.moveWaist);
          }
         
        } else if (waist >= 85 && this.ruleForm.gender === "女") {
          const waisIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("腹型肥胖")
          );
          if (waisIndex === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[3]);
          }
          let waistScore = waist * 0.98;
          this.moveWaist = `减腰围(目标   ${waistScore.toFixed(1)}     CM)`;
          const index1 = this.ruleForm11.riskControlList.findIndex((item) =>
            item.includes(this.moveWaist)
          );
          if(index1 === -1){
            this.ruleForm11.riskControlList.push(this.moveWaist);
          }
          
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation.includes("腹型肥胖")
          );
          const index1 = this.ruleForm11.riskControlList.findIndex((item) =>
            item.includes("减腰围")
          );

          this.moveWaist = `减腰围(目标        CM)`;
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
          if (index1 !== -1) {
            this.ruleForm11.riskControlList.splice(index1, 1);
          }
        }
        //血糖
        if (this.ruleForm2.populationCategoryList.includes("糖尿病")) {
          if (randomGlucose >= 10||fastingBloodGlucose>=7) {
            const tnbIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[4].abnormalSituation
            );
            if (tnbIndex === -1) {
              this.ruleForm10.examAbnormalitiesList.push(bmiList[4]);
            }
          } else {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[4].abnormalSituation
            );

            if (index !== -1) {
              this.ruleForm10.examAbnormalitiesList.splice(index, 1);
            }
          }
        }
        if (!this.ruleForm2.populationCategoryList.includes("糖尿病")) {
          if (randomGlucose >= 11.1||fastingBloodGlucose>=7) {
            const tnbIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[5].abnormalSituation
            );
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[4].abnormalSituation
            );

            if (tnbIndex === -1 && index === -1) {
              this.ruleForm10.examAbnormalitiesList.push(bmiList[5]);
            }
          } else {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[5].abnormalSituation
            );
            if (index !== -1) {
              this.ruleForm10.examAbnormalitiesList.splice(index, 1);
            }
          }
          // 非糖尿病患者6.1mmol/L≤空腹血糖<7.0mmol/L或7.8mmol/L<随机血糖<11.1mmol/L 时显示“糖调节受损或糖尿病前期
          if((6.1<=fastingBloodGlucose&&fastingBloodGlucose<7.0)||(7.8<=randomGlucose&&randomGlucose<11.1)){
            
            
            const tnbIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[11].abnormalSituation
            );
            if(tnbIndex===-1){
              this.ruleForm10.examAbnormalitiesList.push(bmiList[11]);
             
              
            }
          }else{
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[11].abnormalSituation
            );
            if (index !== -1) {
              this.ruleForm10.examAbnormalitiesList.splice(index, 1);
            }
          }
        }
        //转诊逻辑 空腹血糖或者随机血糖 小于等于3.9  大于等于16.7
        if((fastingBloodGlucose&&fastingBloodGlucose<=3.9)||
        (fastingBloodGlucose&&fastingBloodGlucose>=16.7)||
        (randomGlucose&&randomGlucose<=3.9)||(randomGlucose&&randomGlucose>=16.7)){
          const index = this.ruleForm11.healthGuidanceList.findIndex((item) =>
            item.includes("建议转诊")
          );
          if(index === -1){
            this.ruleForm11.healthGuidanceList.push("建议转诊");
           
            this.healthTrue = true;
          }
        }else{
          this.healthTrue = false;
          if (!this.healthTrue) {
            this.ruleForm11.healthGuidanceList =
              this.ruleForm11.healthGuidanceList.filter(
                (item) => item !== "建议转诊"
              );
            
          }
           
        }
        //高血压

        if (
          leftSystolic >= 180 ||
          leftDiastolic >= 110 ||
          rightSystolic >= 180 ||
          rightDiastolic >= 110 ||
          (leftDifference && leftDifference > 20) ||
          (rightDifference && rightDifference > 20)
        ) {
          if (this.ruleForm11.healthGuidanceList.includes("建议复查")) {
            this.ruleForm11.healthGuidanceList =
              this.ruleForm11.healthGuidanceList.filter(
                (item) => item !== "建议复查"
              );
          }
          const index = this.ruleForm11.healthGuidanceList.findIndex((item) =>
            item.includes("建议转诊")
          );
          if (index === -1) {
            this.ruleForm11.healthGuidanceList.push("建议转诊");
            this.referral = true;
          }
        } else {
          if (!this.referral2&&!this.ruleForm11.healthGuidanceList.includes("建议转诊")) {
            this.ruleForm11.healthGuidanceList =
              this.ruleForm11.healthGuidanceList.filter(
                (item) => item !== "建议转诊"
              );
            this.referral = false;
          }
        }

        if (
          this.ruleForm.age < 65 &&
          this.ruleForm2.populationCategoryList.includes("高血压")
        ) {
          if (
            leftSystolic >= 140 ||
            leftDiastolic >= 90 ||
            rightSystolic >= 140 ||
            rightDiastolic >= 90
          ) {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[6].abnormalSituation
            );
            if (index === -1) {
              this.ruleForm10.examAbnormalitiesList.push(bmiList[6]);
            }
          } else {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[6].abnormalSituation
            );
            if (index !== -1) {
              this.ruleForm10.examAbnormalitiesList.splice(index, 1);
            }
          }
        }
        if (
          this.ruleForm.age >= 65 &&
          this.ruleForm2.populationCategoryList.includes("高血压")
        ) {
          if (
            leftSystolic >= 150 ||
            leftDiastolic >= 90 ||
            rightSystolic >= 150 ||
            rightDiastolic >= 90
          ) {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[6].abnormalSituation
            );
            if (index === -1) {
              this.ruleForm10.examAbnormalitiesList.push(bmiList[6]);
            }
          } else {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[6].abnormalSituation
            );
            if (index !== -1) {
              this.ruleForm10.examAbnormalitiesList.splice(index, 1);
            }
          }
        }
        if (!this.ruleForm2.populationCategoryList.includes("高血压")) {
          if (
            leftSystolic >= 140 ||
            leftDiastolic >= 90 ||
            rightSystolic >= 140 ||
            rightDiastolic >= 90
          ) {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[7].abnormalSituation
            );
            if (index === -1) {
              this.ruleForm10.examAbnormalitiesList.push(bmiList[7]);
            }
          } else {
            const index = this.ruleForm10.examAbnormalitiesList.findIndex(
              (item) => item.abnormalSituation === bmiList[7].abnormalSituation
            );
            if (index !== -1) {
              this.ruleForm10.examAbnormalitiesList.splice(index, 1);
            }
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[7].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        //生活能力

        if (elderlySelfCareScore == "轻度依赖（4-8分）") {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[8].abnormalSituation
          );
          if (index == -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[8]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[8].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        if (elderlySelfCareScore == "中度依赖（9-18分）") {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[9].abnormalSituation
          );
          if (index === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[9]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[9].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        if (elderlySelfCareScore == "不能自理（≥19分）") {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[10].abnormalSituation
          );
          if (index === -1) {
            this.ruleForm10.examAbnormalitiesList.push(bmiList[10]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === bmiList[10].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        //脉率
        if (pulse) {
          this.ruleForm9.heartRate = pulse;
        }
      }, 1000),
      immediate: true,
    },
    getruleForm10: {
      handler(newVal, oldVal) {
        const defaultAbnormalities = ["超重", "肥胖", "腹型肥胖"];
        const hasOtherAbnormalities = newVal.examAbnormalitiesList.some(
          (item) => defaultAbnormalities.includes(item)
        );
        const index = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item === item.includes("建议复查")
        );
      
     
        if (index == -1 && hasOtherAbnormalities) {
          this.ruleForm11.healthGuidanceList.push("建议复查");
        }
        if (!hasOtherAbnormalities) {
          const index = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item.includes("建议转诊")
        );
        if(index !==-1){
          this.ruleForm11.healthGuidanceList =
            this.ruleForm11.healthGuidanceList.filter(
              (item) => item !== "建议复查"
            );
        }
          
        }
        const index2 = this.ruleForm11.healthGuidanceList.findIndex(
          (item) => item.includes("建议复查")
        );
        if(index2 ==-1&&!this.ruleForm11.healthGuidanceList.includes("建议复查")){
          this.ruleForm11.healthGuidanceList.push("建议复查");
          console.log('执行了');
        }

        if (newVal.examAbnormalitiesList.length > 0) {
          this.ruleForm10.examAbnormalitiesListStatus = "有";
        } else {
          this.ruleForm10.examAbnormalitiesListStatus = "无";
        }
        
        
      },
      deep: true, // 深度监听，确保对象内部属性的变化也能被监听到
    },

    getruleForm4(val) {
      const { weeklyExercises, smoking, drinkingFrequency,jobHazards,drinkTypeList} = val;
      if (weeklyExercises && weeklyExercises == 0) {
        this.ruleForm4.durationShow = false;
      } else {
        this.ruleForm4.durationShow = true;
      }
      if (smoking == "吸烟") {
        this.ruleForm11.riskControlList.push("戒烟");
         this.ruleForm4.quitSmokingAge=''
      } else {
        const index = this.ruleForm11.riskControlList.indexOf("戒烟");
        if (index !== -1) {
          this.ruleForm11.riskControlList.splice(index, 1);
        }
      }
      if (drinkingFrequency !== "从不") {
        this.ruleForm11.riskControlList.push("健康饮酒");
      } else {
        const index = this.ruleForm11.riskControlList.indexOf("健康饮酒");
        if (index !== -1) {
          this.ruleForm11.riskControlList.splice(index, 1);
        }
        this.ruleForm4.dailyDrinkAmount='';
        this.ruleForm4.startDrinkingAge='';
        this.ruleForm4.quitDrinking='';
        this.ruleForm4.quitDrinkingAge='';
        // this.ruleForm4.quitDrinkingAge=[];
        this.ruleForm4.drunkInPastYear='';
        
      }
      if(smoking == "从不吸烟"){
        this.ruleForm4.dailySmoke='';
        this.ruleForm4.startSmokingAge=''
        this.ruleForm4.quitSmokingAge=''
      }else if(smoking == "已戒烟"){
        this.ruleForm4.startSmokingAge=''
      }
      if(jobHazards=='无'){
        this.ruleForm4.specificJob="";
        this.ruleForm4.yearsOfService="";
        this.ruleForm4.otherHazards="";
        this.ruleForm4.otherProtection="有";
        this.ruleForm4.otherProtectionOther="";
      }
      if(!drinkTypeList.includes('其他')){
        this.ruleForm4.drinkTypeListOther="";
      }
    },
    getruleForm5: {
      handler: debounce(function (newValue) {
        const otherList = [
          { abnormalSituation: "听力减弱" },
          { abnormalSituation: "龋齿，建议复查" },
        ];
        const {
          vision,
          missingTeethList,
          cavitiesList,
          denturesList,
          hearing,
          leftEye,
          rightEye,
          leftjzEye,
          rightjzEye,
          teethAlignmentList,
        } = newValue;
        
        if (
          hearing == "听不清或无法听见" &&
          this.ruleForm2.populationCategoryList.includes("老年人")
        ) {
          const heaIndex = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation == otherList[0].abnormalSituation
          );
          if (heaIndex == -1) {
            this.ruleForm10.examAbnormalitiesList.push(otherList[0]);
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === otherList[0].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
        }
        if (
          teethAlignmentList.includes("龋齿") &&
          this.ruleForm2.populationCategoryList.includes("老年人")
        ) {
          const index1 = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === otherList[1].abnormalSituation
          );
          if (index1 == -1) {
            this.ruleForm10.examAbnormalitiesList.push(otherList[1]);
          }
         
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === otherList[1].abnormalSituation
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
         

        }
        if((teethAlignmentList.includes("义齿(假牙)") &&
        this.ruleForm2.populationCategoryList.includes("老年人"))||(teethAlignmentList.includes("龋齿") &&
        this.ruleForm2.populationCategoryList.includes("老年人"))){
          const index = this.ruleForm11.riskControlOther.includes('注意口腔清洁')
          if(!index){
            if(this.ruleForm11.riskControlList.includes("其他")){
               this.ruleForm11.riskControlOther+='  注意口腔清洁  '
            }else{
              this.ruleForm11.riskControlList.push("其他")
              this.ruleForm11.riskControlOther+='  注意口腔清洁  '
            }
           
          }
        }else{
          const index = this.ruleForm11.riskControlOther.includes('注意口腔清洁')
          if(index){
            this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther.replace('注意口腔清洁','')
          }    
        }
        //视力处理
        // leftEye,
        // rightEye,
        // leftjzEye,
        // rightjzEye,
        if (
          ((0.1 <= leftEye && leftEye < 1.0) ||
            (4.0 <= leftEye && leftEye < 5.0)) &&
          this.ruleForm2.populationCategoryList.includes("老年人")
        ) {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === "视力减退"
          );
           if (index == -1) {
            this.ruleForm10.examAbnormalitiesList.push({
              abnormalSituation: "视力减退",
            });
          };
          const index2 = this.ruleForm11.riskControlOther.includes('需佩戴眼镜')
          if(this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
          }else if(!this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
           this.ruleForm11.riskControlList.push("其他")
          }
          

          // else{
          //   if(index2==-1){
          //     this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'需佩戴眼镜   '
          //   }
          // }
          // if (index == -1) {
          //   this.ruleForm10.examAbnormalitiesList.push({
          //     abnormalSituation: "视力减退",
          //   });
          // }
        } else if (
          ((0.1 <= rightEye && rightEye < 1.0) ||
            (4.0 <= rightEye && rightEye < 5.0)) &&
          this.ruleForm2.populationCategoryList.includes("老年人")
        ) {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === "视力减退"
          );
          if (index == -1) {
            this.ruleForm10.examAbnormalitiesList.push({
              abnormalSituation: "视力减退",
            });
          }
          const index2 = this.ruleForm11.riskControlOther.includes('需佩戴眼镜')
          if(this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
          }else if(!this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
           this.ruleForm11.riskControlList.push("其他")
          }
        } else if (
          ((0.1 <= leftjzEye && leftjzEye < 1.0) ||
            (4.0 <= leftjzEye && leftjzEye < 5.0)) &&
          this.ruleForm2.populationCategoryList.includes("老年人")
        ) {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === "视力减退"
          );
          if (index == -1) {
            this.ruleForm10.examAbnormalitiesList.push({
              abnormalSituation: "视力减退",
            });
          }
          const index2 = this.ruleForm11.riskControlOther.includes('需佩戴眼镜')
          if(this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
          }else if(!this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
           this.ruleForm11.riskControlList.push("其他")
          }
        } else if (
          ((0.1 <= rightjzEye && rightjzEye < 1.0) ||
            (4.0 <= rightjzEye && rightjzEye < 5.0)) &&
          this.ruleForm2.populationCategoryList.includes("老年人")
        ) {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === "视力减退"
          );
          if (index == -1) {
            this.ruleForm10.examAbnormalitiesList.push({
              abnormalSituation: "视力减退",
            });
          }
          const index2 = this.ruleForm11.riskControlOther.includes('需佩戴眼镜')
          if(this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
          }else if(!this.ruleForm11.riskControlList.includes("其他")&&!index2){
           this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther+'  需佩戴眼镜   '
           this.ruleForm11.riskControlList.push("其他")
          }
        } else {
          const index = this.ruleForm10.examAbnormalitiesList.findIndex(
            (item) => item.abnormalSituation === "视力减退"
          );
          if (index !== -1) {
            this.ruleForm10.examAbnormalitiesList.splice(index, 1);
          }
          const index2 = this.ruleForm11.riskControlOther.includes('需佩戴眼镜')
          if(index2){
            this.ruleForm11.riskControlOther=this.ruleForm11.riskControlOther.replace('需佩戴眼镜','')
          }
          if(this.ruleForm11.riskControlOther==''){
            this.ruleForm11.riskControlList=this.ruleForm11.riskControlList.filter(item => item !== '其他')
          }
        }
      }, 1000),
      immediate: true,
    },
    getruleForm6:{
      handler(newValue, oldValue) {
        const {
        cerebrovascularDiseaseList,
        kidneyDiseaseList,
        heartDiseaseList,
        vascularDiseaseList,
        eyeDiseaseList,
        nervousSystemDisease,
        otherSystemDisease
      }= newValue;
       if(!cerebrovascularDiseaseList.includes("其他")){
        this.ruleForm6.cerebrovascularDiseaseOther=""
       }
       if(!kidneyDiseaseList.includes("其他")){
        this.ruleForm6.kidneyDiseaseOther=""
       }
       if(!heartDiseaseList.includes("其他")){
        this.ruleForm6.heartDiseaseOther=""
       }
       if(!vascularDiseaseList.includes("其他")){
        this.ruleForm6.vascularDiseaseOther=""
       }
       if(!eyeDiseaseList.includes("其他")){
        this.ruleForm6.eyeDiseaseOther=""
       }
       if(nervousSystemDisease!=='有'){
        this.ruleForm6.nervousSystemDiseaseOther=''
       }
       if(otherSystemDisease!=='有'){
         this.ruleForm6.otherSystemDiseaseOther=''
       }

     
        
      },
      deep: true,
    },
    getruleForm9: {
      handler: debounce(function (newValue) {
        const {
          skin,
          sclera,
          lymphNodesList,
          barrelChest,
          breathSounds,
          ralesList,
          heartRhythm,
          heartRate,
          heartMurmur,
          legEdema,
          dorsalPulsePartList,
          shiftingDullness,
          abdominalTenderness,
          hepatomegaly,
          splenomegaly,
          abdominalMass,
        } = newValue;
        if(skin!=='其他'){
        this.ruleForm9.skinOther=''
        }
        if(sclera!=='其他'){
        this.ruleForm9.scleraOther=''                                
        }
        if(!lymphNodesList.includes('其他')){
          this.ruleForm9.lymphNodesOther=''
        }
        if(breathSounds!=='异常'){
        this.ruleForm9.breathSoundsOther=''
        }
        if(!ralesList.includes('其他')){
          this.ruleForm9.ralesListOther=''
        }
        if(heartMurmur=='无'){
          this.ruleForm9.heartMurmurOther=''
        }
       
        
        if(abdominalTenderness=='无'){
          this.ruleForm9.abdominalTendernessOther=''
        }
        if(abdominalMass=='无'){
          this.ruleForm9.abdominalMassOther=''
        }
        if(hepatomegaly=='无'){
          this.ruleForm9.hepatomegalyOther=''
        }
        if(splenomegaly=='无'){
          this.ruleForm9.splenomegalyOther=''
        }
        if(shiftingDullness=='无'){
          this.ruleForm9.shiftingDullnessOther=''
        }
        
        if (
          skin == "黄染" ||
          sclera == "黄染" ||
          lymphNodesList.includes("锁骨上") ||
          lymphNodesList.includes("腋窝") ||
          breathSounds == "异常" ||
          ralesList.includes("干啰音") ||
          ralesList.includes("湿啰音") ||
          (heartRate > 0 && heartRate > 100) ||
          (heartRate > 0 && heartRate < 40) ||
          abdominalMass == "有" ||
          heartRhythm == "不齐" ||
          heartRhythm == "绝对不齐" ||
          dorsalPulsePartList.includes("触及触及左侧减弱或消失") ||
          dorsalPulsePartList.includes("触及右侧减弱或消失") ||
          shiftingDullness == "有" ||
          legEdema == "单侧" ||
          abdominalTenderness == "有" ||
          hepatomegaly == "有" ||
          splenomegaly == "有" ||
          heartMurmur == "有"
        ) {
          if (this.ruleForm11.healthGuidanceList.includes("建议复查")) {
            this.ruleForm11.healthGuidanceList =
              this.ruleForm11.healthGuidanceList.filter(
                (item) => item !== "建议复查"
              );
          }
          const index = this.ruleForm11.healthGuidanceList.findIndex((item) =>
            item.includes("建议转诊")
          );
          if (index === -1) {
            this.ruleForm11.healthGuidanceList.push("建议转诊");
            this.referral2 = true;
      
          }
        } else {
          if (!this.referral) {
            this.ruleForm11.healthGuidanceList =
              this.ruleForm11.healthGuidanceList.filter(
                (item) => !item.includes("建议转诊")
              );
            this.referral2 = false;
         
          }
        }
       
      }, 1000),
      immediate: true,
    },
    getruleForm11: {
      handler(newValue, oldValue) {
        const { healthGuidanceList } = newValue;
        if (
          healthGuidanceList.includes("建议转诊") &&
          healthGuidanceList.includes("建议复查")
        ) {
          this.ruleForm11.healthGuidanceList = healthGuidanceList.filter(
            (item) => item !== "建议复查"
          );
        }
        console.log("newValue", healthGuidanceList);
        
      },
      deep: true,
    },
  },
  mounted() {
    this.ruleForm.exaTime = this.getCurrentDate(); // 设置默认体检日期
    this.ruleForm11.nextYearExaTime = this.getNextYearDate(); //设置年检日期
  },
};
</script>

<style scoped>
.main {
  /* width: 100%;
  height: 100%; */
}
.main-bottom {
  height: 50px;
  padding: 10px;
  text-align: right;
}
.main-bottom .el-button {
  height: 50px;
  width: 100px;
  font-size: 20px;
}
.tip {
  font-size: 12px;
  color: red;
  z-index: 9;
}
.main-bottom {
  height: 50px;
  padding: 10px;
  text-align: right;
  position: fixed;
  bottom: 15px;
  right: 30px;
}
.main-bottom .el-button {
  height: 50px;
  width: 120px;
  font-size: 20px;
}
:deep(.el-anchor .el-anchor__list .el-anchor__item a) {
  font-size: 16px;
  text-align: center;
  line-height: 40px;
  width: 150px;
  /* margin-left: 20px; */
}
.menu_box {
  /* height: 100%; */

  position: relative;
}
.anchor {
  position: fixed;
  border: 1px solid #dfe4ed;
  height: 84%;
  width: 150px;
  background-color: #f5f7fa;
  overflow-y: auto;
}

:deep(.el-anchor__link.is-active) {
  background-color: #fff;
  color: #4165d7; /* 可选：将文字颜色设为白色 */
}
.anchor::-webkit-scrollbar {
  display: none !important;
}
/* .content_box::-webkit-scrollbar {
  display: none !important;
} */
.residents-container {
  box-sizing: border-box;
  -ms-overflow-style: none !important; /* 适用于IE和Edge */
  scrollbar-width: none !important; /* 适用于Firefox */
}
.res-add-content {
  overflow-y: auto;
  box-sizing: border-box;
  -ms-overflow-style: none !important; /* 适用于IE和Edge */
  scrollbar-width: none !important; /* 适用于Firefox */
}
.res-add-content::-webkit-scrollbar {
  display: none !important;
}
.tip {
  font-size: 12px;
  color: red;
  z-index: 9;
  margin-left: 80px;
  display: block;
  height: 30px;
}
.ml20 {
  margin-left: 25px;
}
.flex {
  display: flex;
}
.el-radio.is-bordered {
  padding: 0 35px 0 35px;
  height: 32px;
}
.shell {
  width: 100%;
  border: 1px solid #ccc;
}
:deep(.el-checkbox-group) {
  display: flex;
  flex-wrap: wrap;
}
:deep(.el-form-item__label) {
  font-size: 16px !important;
}
:deep(.el-checkbox.el-checkbox--large .el-checkbox__label) {
  font-size: 16px !important;
}
:deep(.el-radio.el-radio--large .el-radio__label) {
  font-size: 16px !important;
}
:deep(.el-input__wrapper) {
  height: 30px;
}
:deep(.el-input--large) {
  height: 32px;
}
:deep(.el-checkbox) {
  margin-right: 18px;
}
:deep(.el-input-group__append) {
  width: 20px;
}
/* :deep(.el-checkbox__inner) {
  border-radius: 50%;
} */
:deep(.el-dialog__header) {
  background-color: #016dff;
  margin: 0;
  height: 30px;
}
:deep(.el-dialog__title) {
  color: #fff;
}
:deep(.el-dialog__headerbtn .el-dialog__close) {
  color: #fff;
  font-size: 30px;
}
:deep(.el-form-item--large .el-form-item__content) {
  margin-left: 0 !important;
}
:deep(.el-anchor.el-anchor--vertical .el-anchor__list) {
  padding: 0;
}
.title_box {
  width: 150px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border: 1px solid #000;
  background-color: #ccc;
}
.iconBox {
  font-size: 25px;
  /* position: absolute;
  right: 168px;
  top: 68px; */
  cursor: pointer;
  margin-left: 15px;
}
.flexBox {
  display: flex;
}
:deep(.el-select--large .el-select__wrapper) {
  min-height: 30px;
}
</style>
